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

Clean up H5P cacheassets

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 3.11
    • Fix Version/s: None
    • Component/s: H5P
    • Testing Instructions:
      Hide
      1. Create a course
      2. Create h5p activity (you can use attached package)
      3. Go to h5p activity page
      4. Ensure this query returns some results

        SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets';

      5. Run cleanup cron task

        php admin/cli/scheduled_task.php --execute='\core\task\h5p_clean_up_task'
        

      6. Ensure this query returns no results

        SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets';

      7. Go to activity page again
      8. Ensure this query returns some results

        SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets';

      9. Purge caches (you can do it 2 different ways):
        • Go to Site administration->Development->Purge caches and click Purge all caches
        • run this in command line inside your moodle directory (smth like /var/www/moodle)

          php admin/cli/purge_caches.php
          

      10. Ensure this query returns no results

        SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets';

      Show
      Create a course Create h5p activity (you can use attached package) Go to h5p activity page Ensure this query returns some results SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets' ; Run cleanup cron task php admin/cli/scheduled_task.php --execute= '\core\task\h5p_clean_up_task' Ensure this query returns no results SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets' ; Go to activity page again Ensure this query returns some results SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets' ; Purge caches (you can do it 2 different ways): Go to Site administration->Development->Purge caches and click Purge all caches run this in command line inside your moodle directory (smth like /var/www/moodle) php admin/cli/purge_caches.php Ensure this query returns no results SELECT f.id, f.pathnamehash FROM mdl_files f WHERE f.filearea = 'cachedassets' ;
    • Affected Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-70756-311
    • Pull Master Branch:
      MDL-70756-master
    • Sprint:
      Moppies Kanban

      Description

      While reviewing MDL-66769 I've seen that cacheassets (component=core_h5p, filearea=cachedassets) are never removed.

      They are temporary files, created to improve performance and they should be removed when caches are purged, when a clean up H5P task is run or in both cases. These files will be regenerated again the first time a user tries to access to the H5P content.
       
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ilyatregubov Ilya Tregubov
              Reporter:
              sarjona Sara Arjona (@sarjona)
              Peer reviewer:
              Carlos Escobedo Carlos Escobedo
              Integrator:
              Víctor Déniz Falcón Víctor Déniz Falcón
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 1 minute
                  3h 1m