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

Make file cache store purges instant with a safe and async purge

    XMLWordPrintable

    Details

      Description

      If you have a very large shared file store cache, and it is completely purged eg after a release, then it uses a file glob to iterate over the files and delete them which can be fairly slow with millions of files. The file deletion doesn't need to block the release from finishing.

      Proposing to add a new option to the file cache store which when set stores all cache keys under an extra version key:

      cache/cachestore_file/1592480344/default_application

      instead of

      cache/cachestore_file/default_application

      When a purge happens, it just bumps the key to invalidate, and then fires of an adhoc task to slowly delete the old set of data.

      The $CFG->localcachedirpurged key should be well suited, or something new so it could be 1 key per store instance.

      Or alternatively don't make an option and just make this the way it works for everyone.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            brendanheywood Brendan Heywood
            Participants:
            Component watchers:
            Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: