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

Mustache templates not clearing from local cache

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-62801-master
    • 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.

      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

            michaelh Michael Hawkins
            ryanwyllie Ryan Wyllie
            Mihail Geshoski Mihail Geshoski
            Jake Dallimore Jake Dallimore
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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