Invalidate cache for updated files in Process #12815
Labels
added-to-sprint
area/process
Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc).
kind/bug
Used when there is a defect / something is not working as it should.
Description of the bug
When editing the taskId for a task, the application continues to use the old taskId from layoutsets until the page is refreshed. This behavior indicates that the cache is not being invalidated correctly when updates occur.
To handle this issue, and similar cases in the future, we need to ensure that the cache of the updated files is invalidated properly. This can be achieved by leveraging the WebSocket message handling mechanism.
When a message is received from the backend in the
onWSMessageReceived
function and it indicates success, themessage.source
brings info about the updated file(s).Using the information from message.source, we can map the updated file to the corresponding query keys that should be invalidated. This ensures that the cache reflects the latest state of the data.
Steps To Reproduce
Additional Information
No response
The text was updated successfully, but these errors were encountered: