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

Cache invalidation doesn't occur after database restart #269

Open
adnathanail opened this issue Oct 25, 2024 · 0 comments
Open

Cache invalidation doesn't occur after database restart #269

adnathanail opened this issue Oct 25, 2024 · 0 comments

Comments

@adnathanail
Copy link

What happened?

After I restart my database, any updates to tables are no longer pushed to the cache until I restart my webservers.

What should've happened instead?

Cache invalidation should continue occurring despite the DB restart.

Steps to reproduce

  • Set up cachalot to cache a table
  • Make a query to that table
    • Check a DB query was made
  • Make the same query
    • Check a DB query was not made
  • Update a record returned by that query
  • Make the same query
    • Check the new value is returned
  • Restart the DB
  • Update that record again
  • Make the same query
  • The stale value is returned

OS: python:3.12-slim-bookworm Docker image (Debian Bookworm)
Django version: 5.0.8
Database: Postgres 16
Cachalot version: 2.6.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant