Skip to content

Cached objects become stale after Django upgrade #546

Open
@elgintg

Description

@elgintg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions