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

Reposotory classes should NOT have caching. It must be possible to access uncached data #320

Open
SandGrainOne opened this issue Jan 22, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@SandGrainOne
Copy link
Member

SandGrainOne commented Jan 22, 2024

Description of the bug

Storage isn't returning the last version of the texts if the texts happens to have been added to the cache prior to the update.

The issue is noticable in altinn.studio during deploy, if a developer performs two (or more) deploys within 1 hour.

Steps To Reproduce

  1. Create a new App in altinn.studio
  2. Deploy the App to any environment
  3. Make any change to texts
  4. Deploy the App to the same environment. This must be done after no more than 1 hour. That is the lifetime of the cache.
  5. This results in an exception in studio
  6. In Storage we should find a few 409 responses and maybe some "row already exists" errors

Additional Information

The issue here occure because Storage is caching a sort of dummy/empty text representation when there are no texts matching the input criterias. We can keep returning NotFound for an entire hour even though the texts have been added in the mean time.

@SandGrainOne SandGrainOne added the kind/bug Something isn't working label Jan 22, 2024
@SandGrainOne SandGrainOne changed the title Storage needs to invalidate Text Cache on POST or PUT requests. Reposotory classes should NOT have caching. It must be possible to access data directly. Jan 22, 2024
@SandGrainOne SandGrainOne changed the title Reposotory classes should NOT have caching. It must be possible to access data directly. Reposotory classes should NOT have caching. It must be possible to access uncached data Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant