Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4714

cachestore_apc's purge() does not work with APCU

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.5.2
    • Cache store: APC
    • None
    • 2013033000
    • MOODLE_25_STABLE

      Hi,

      I've been testing out the cachestore_apc plugin with PHP 5.5 and APCU. APCU is a stripped down version of APC that only provides user caching, and no opcode caching since PHP 5.5 has its own opcache now.

      I found that cachestore_apc works fine with APCU except for the purge() function. Looks like apc_cache_info() in APCU works a little differently than regular APC, and what the function returns doesn't match watch the purge() is expecting, so the cache isn't purged and errors are generated.

      You can reproduce this problem by installing APCU and cachestore_apc, configuring the Moodle site to use the APC cache store, and then try purging caches. Alternatively you can just visit the cache performance test page once cachestore_apc is installed and you'll see the errors that get generated indicating that the purge() function failed.

      I took a crack at fixing the problem, and you can find my fix for it at https://github.com/durana/moodle-cachestore_apc.

      Thanks!

            samhemelryk Sam Hemelryk
            adurana Adam Durana
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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