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

cleanup and improved caching in lib/javascript.php

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: Caching, JavaScript
    • Labels:
      None
    • Testing Instructions:
      Hide

      0/ install moodle (verify JS scripts get loaded properly)
      1/ make sure JS caching is enabled
      2/ load page that depends on some JS served via lib/javascript.php file
      3/ verify the that the JS gets loaded with proper cache headers
      4/ verify the cache files are created in $CFG->cachedir/js/ (dataroot/cache/ by default)
      5/ purge caches
      6/ verify the JS file is served with different etag and URL (check revision number)
      7/ set $CFG->cachejs = 0 in your config.php
      8/ verify the lib/javascript.php serves files without caching headers

      Show
      0/ install moodle (verify JS scripts get loaded properly) 1/ make sure JS caching is enabled 2/ load page that depends on some JS served via lib/javascript.php file 3/ verify the that the JS gets loaded with proper cache headers 4/ verify the cache files are created in $CFG->cachedir/js/ (dataroot/cache/ by default) 5/ purge caches 6/ verify the JS file is served with different etag and URL (check revision number) 7/ set $CFG->cachejs = 0 in your config.php 8/ verify the lib/javascript.php serves files without caching headers
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w29_MDL-40546_m26_jscache

      Description

      Goals:

      • solve caching issues when $CFG->cachejs = 0 (at present we just send links to static JS files which confuses developers because they need to invalidate browser caches manually)
      • improve coding style
      • preparation for introduction of $CFG->localcachedir

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Frédéric Massart
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13