-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Redis prefix causes ever-growing redis cache size #32203
Copy link
Copy link
Open
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapenhancementfeature: cachingRelated to our caching system: scssCacher, jsCombiner...Related to our caching system: scssCacher, jsCombiner...
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapenhancementfeature: cachingRelated to our caching system: scssCacher, jsCombiner...Related to our caching system: scssCacher, jsCombiner...
Type
Fields
Give feedbackNo fields configured for Enhancement.
Whenever Nextcloud or an app is updated the Memcache prefix is changing and old stored keys without an expiry would just stay around forever. Since the prefix is also hashed and not easily genera table due to the app version list in place there is also currently no good way to clean them up manually.
server/lib/private/Server.php
Lines 712 to 726 in 7817845
Maybe we could consider having a predictable global prefix, so we could also introduce a nightly job to delete outdated keys?
On the other hand deleting keys by prefix is a rather heavy operation as it requires a KEYS and then a DEL for each key on the Redis side, so maybe a default expiry of some weeks would also be something that we could consider.
cc @nextcloud/server-backend