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

Cached objects become stale after Django upgrade #546

Open
elgintg opened this issue Jan 10, 2025 · 0 comments
Open

Cached objects become stale after Django upgrade #546

elgintg opened this issue Jan 10, 2025 · 0 comments

Comments

@elgintg
Copy link

elgintg commented Jan 10, 2025

After upgrading Django version to 4.2 few months back, I now notice warning messages:

RuntimeWarning: Pickled model instance's Django version 3.2.14 does not match the current version 4.2.16.

These come from pickled switch objects in Redis cache. After having deleted all waffle keys from Redis, warnings are now silenced. By reading docs and going through the source code, I couldn't find any management command for clearing cache. I think the ideal solution would be to add new setting for cache expiration time.

In my particular case, I use only switches and hitting database from time to time for refreshing entries is totally fine.

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