Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate cache for updated files in Process #12815

Closed
lassopicasso opened this issue May 16, 2024 · 1 comment · Fixed by #12827
Closed

Invalidate cache for updated files in Process #12815

lassopicasso opened this issue May 16, 2024 · 1 comment · Fixed by #12827
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.

Comments

@lassopicasso
Copy link
Contributor

lassopicasso commented May 16, 2024

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, the message.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

  1. Go to process page
  2. Add 2 layoutsets
  3. Update the task id for one of them
  4. Go to the other layoutset and update with same task id as the other one. (no error message, because it still checks the old taskId)

Additional Information

No response

@lassopicasso lassopicasso added kind/bug Used when there is a defect / something is not working as it should. area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). added-to-sprint labels May 16, 2024
@lassopicasso lassopicasso self-assigned this May 16, 2024
@lassopicasso lassopicasso linked a pull request May 21, 2024 that will close this issue
4 tasks
@lassopicasso lassopicasso removed their assignment May 22, 2024
@framitdavid framitdavid self-assigned this May 23, 2024
@framitdavid
Copy link
Collaborator

Tested OK in dev.

@framitdavid framitdavid removed their assignment May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants