-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Milestone
Description
We had the same issue as #58 , but with Redis. The keyring was growing over time, until it became so large that everything slowed down, transferring a huge amount of data to and from the cache.
As a quick fix, there should at least be a limit to the keyring size.
I also have some shower thoughts for a proper fix:
- Keyring in database Keyring in databaseย #66 is interesting, but needs care to make sure it works on a busy site with a lot of pages.
- The keyring could be optional via a setting.
- Instead of removing specific keys from the cache, you could add "invalidation" keys to the cache. (Edit: this could work but it's a bit complicated. You wouldn't be able to see a list of URLs in the admin)
- Keys could be page id's instead of URLs, which can be long (Edit: Not an option - Page ID not available early in middleware)
- If you made url matching more limited than regex (glob), you could find keys with Redis SCAN MATCH.
- Keyring doesn't tell you what's actually in the cache, just what has been in the cache, and might still be there. cache.get_many could be used to find what's actually there.
MasonLyons
Metadata
Metadata
Assignees
Labels
No labels