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

Discard cachestore information on configuration changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Major Major
    • None
    • 3.6.6, 3.7, 3.8
    • Caching
    • None
    • MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE

      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

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.