Altinn / altinn-access-management-frontend

Frontend for access management
MIT License
3 stars 1 forks source link

Localizations are cached for 5 minutes #877

Closed Albertlarsen closed 2 months ago

Albertlarsen commented 2 months ago

Description of the bug

Theory: Localizations are cached for 5 minutes by default in react-query. This makes localizations dated for 5 minutes when a localization is updated.

Task:

https://stackoverflow.com/questions/77082565/fetch-new-data-every-30-seconds-using-usequery-in-react

Steps To Reproduce

  1. Update text resource and see how long it takes to update

Additional Information

No response

Albertlarsen commented 2 months ago

Proposed solution: 1. enable when asking in localization query that when there are no localizations it should give status failed. 2. Make react-query refetch when status failed