• Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Caching
    • Labels:


      The difference from normal $CFG->cachedir is that the directory does not have to be shared by all cluster nodes, the files stored in $CFG->localcachedir MUST NOT change! Default location is "$CFG->dataroot/localcache".

      All files there must use unique revision numbers or hashes because the cached data can not be invalidated by any means - it will support only adding of new files, but no file deletes or overrides. The $CFG->localcachedir will be growing over time, all local cache files will be deleted during purge_all_caches() (usually upgrade).

      When using hashes please make sure the number of files in one directory is kept to some reasonable number because some filesystems might have problems with large number of files in one directory.

      Design requirements:

      • Everything must be automatic without extra administrative overhead.
      • purge_all_caches() on any node triggers local cache purging on all other nodes before adding any new files there.
      • Performance on standalone servers must not be worse.

      Usage restrictions:

      • No file deletes
      • No file modifications
      • No file overwriting
      • Soft limit on maximum number of files in one directory (few thousands)


      • clustered servers may use local tempfs
      • no opcache cache invalidation problems if php files included from localcachedir (because the files must not change)

      Converted areas:

      1. lib/javascript.php
      2. theme/*

        Gliffy Diagrams


            Issue Links



                • Votes:
                  3 Vote for this issue
                  11 Start watching this issue


                  • Created:
                    Fix Release Date: