-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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...
Description
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.
Lines 712 to 726 in 7817845
| if (!$config->getSystemValueBool('log_query')) { | |
| $v = \OC_App::getAppVersions(); | |
| } else { | |
| // If the log_query is enabled, we can not get the app versions | |
| // as that does a query, which will be logged and the logging | |
| // depends on redis and here we are back again in the same function. | |
| $v = [ | |
| 'log_query' => 'enabled', | |
| ]; | |
| } | |
| $v['core'] = implode(',', \OC_Util::getVersion()); | |
| $version = implode(',', $v); | |
| $instanceId = \OC_Util::getInstanceId(); | |
| $path = \OC::$SERVERROOT; | |
| $prefix = md5($instanceId . '-' . $version . '-' . $path); |
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
skjnldsv, ChristianTacke and sokai
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...