Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.6.6, 3.7, 3.8
-
None
-
None
-
MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
Description
This was detected while testing MDL-66428, because the new compression option introduced there is really verbose with bad data in incorrect format.
It seems that, whenever any cachestore option is changed (and this potentially applies to all the options (prefix, serializer, paths, compressors...) we never discard currently cached data.
A) In some cases (say changing prefix or paths...) that just means that a new set of values is being cached completely ignoring the previous ones.
B) In other cases (say changing serialized, compressor options) it means that the old data is read, that leads to a problem (incorrect format), so it's considered a miss and then new values are calculated and set (overwriting old ones).
None of the 2 cases is ideal, because they leave orphaned information in the caches (that they may or may-not be cleaned, it depends of every store abilities, TTLs...).
Note that this is not urgent at all, because current serializers and compressors seem to behave ok and detect the data is invalid... but this may lead to big problems if there is any serializer or compressor incorrectly doing assumptions and returning wrong data.
So this is a proposal to, whenever a change in the configuration of a cache store instance is performed... lets always purge/clean its data.
That way there won't be old data being left behind, neither forced recalculations caused by bad data/potential risks reading it. Just proper/real misses because we have cleaned the old information.
Ciao
Attachments
Issue Links
- Discovered while testing
-
MDL-66428 Allow Redis cache to use PHP extension Zstd
-
- Closed
-