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

Mustache templates not clearing from local cache

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      NOTE: This needs to be tested by someone who can access their site's localcache directory.

      Testing mustache revision update

      1. In your local terminal, open your site's mustache localcache, the path will be something like ~moodles/ {site_name}/moodledata/localcache/mustache/
      2. View the mustache directory contents, and note down the subdirectory name (now referred to as rev1). If there is more than one, note down the one whose name is the largest number.
      3. Log into your test Moodle site as admin.
      4. Navigate to Site admin > Appearance > click 'Boost'.
      5. Click 'Advanced settings' and add some scss to 'Raw SCSS' (eg .blah { float: left; }) and click 'Save changes'.
      6. Return to your terminal, and again view the contents of the mustache directory, to check the revision directories that exist there.
      7. CONFIRM there is only subdirectory present, and CONFIRM the subdirectory is a larger number than rev1.
      Show
      NOTE: This needs to be tested by someone who can access their site's localcache directory. Testing mustache revision update In your local terminal, open your site's mustache localcache, the path will be something like ~moodles/ {site_name}/moodledata/localcache/mustache/ View the mustache directory contents, and note down the subdirectory name (now referred to as rev1). If there is more than one, note down the one whose name is the largest number. Log into your test Moodle site as admin. Navigate to Site admin > Appearance > click 'Boost'. Click 'Advanced settings' and add some scss to 'Raw SCSS' (eg .blah { float: left; }) and click 'Save changes'. Return to your terminal, and again view the contents of the mustache directory, to check the revision directories that exist there. CONFIRM there is only subdirectory present, and CONFIRM the subdirectory is a larger number than rev1.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-62801-master

      Description

      When templates are rendered in PHP it stores the generated PHP classes in local cache. If the theme revision is bumped from an admin modifying theme settings (e.g. adding custom CSS) then new mustache templates are generated and cached but the older caches are never cleared. This leads to a build up of stale data on disk.

      To replicate:

      1. Log in as admin
      2. Go to site administration > appearance > themes > Boost
      3. Click advanced settings
      4. Add some custom CSS in the Raw CSS field
      5. Save changes
      6. View the mustache directory in the local cache directory and see two revision directories

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jul/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m