Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66896

Discard cachestore information on configuration changes



    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.6, 3.7, 3.8
    • None
    • Caching
    • None


      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.



        Issue Links



              Unassigned Unassigned
              stronk7 Eloy Lafuente (stronk7)
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              2 Vote for this issue
              2 Start watching this issue