WordPress.org

Ready to get started?Download WordPress

Forums

Quick Cache (Speed Without Compromise)
Quick Cache Plugin Not working: no Mutex Lock? (2 posts)

  1. carolm
    Member
    Posted 1 year ago #

    I installed Quick Cache ok at this site: http://www.mysecondmillion.com and on my other site too - it's the same problem.

    I Checked everything 3 times. When I log out and look at my view Page Source there is no green Quick Cache information at the end of the page.

    I checked wp-content/cache/advanced cache (I think) - and I found this about Quick Cache (an extract):
    ----------------------

    if (QUICK_CACHE_USE_FLOCK_OR_SEM === "sem" && function_exists ("sem_get") && ($mutex = @sem_get (1976, 1, 0644 | IPC_CREAT, 1)) && @sem_acquire ($mutex) && ($cached = true))
    file_put_contents (QUICK_CACHE_FILE, serialize ($headers) . "<!--headers-->" . $cache) . sem_release ($mutex);
    /**/
    else if (($mutex = @fopen (WP_CONTENT_DIR . "/cache/qc-l-mutex.lock", "w")) && @flock ($mutex, LOCK_EX) && ($cached = true))
    file_put_contents (QUICK_CACHE_FILE, serialize ($headers) . "<!--headers-->" . $cache) . flock ($mutex, LOCK_UN);
    /**/
    return ($cached) ? $cache : $buffer . "\n<!-- Quick Cache: failed to write cache, unable to obtain a mutex lock at the moment. Quick Cache will try again later. -->";
    }
    else /* We need to report that the cache/ directory is either non-existent ( and could not be created ) or it is not writable. */
    {
    return $buffer . "\n<!-- Quick Cache: failed to write cache. The cache/ directory is either non-existent ( and could not be created ) or it is not writable. -->";
    }
    }
    /**/
    ob_start("ws_plugin__qcache_builder"); /* Start output buffering. */
    }
    }
    }
    }
    /**/
    if (QUICK_CACHE_ENABLED) /* Only if enabled. */
    call_user_func("ws_plugin__qcache_handler");
    ?>
    --------------------------

    I've tried Mutex Flock and Semaphore in settings but still no green text showing.

    The strange thing is that my site is now much faster, and when I update any Post, I get a message saying that Quick Cache has updated the cache.

    So is it working or not? Or could it work even better? ...Something weird is happening here, but I don't know what it is....do I, Mister Jones... - But I digress.

    Any clues anyone?

    http://wordpress.org/extend/plugins/quick-cache/

  2. wpconvert
    Member
    Posted 11 months ago #

    Hi carolm

    Just out of interest, what version of PHP are you using?

    I have personally found issues with running Quick Cache under PHP 5.3 - receiving the 'unable to obtain mutex lock' message at the bottom of my page source - and I tried everything!
    When Quick Cache was enabled, the site reported the above message and was no faster in Firefox or Safari (though bizarrely, it seemed ok in IE10?).

    Anyway, rolling back to PHP 5.2.6 did the trick and the caching worked in all browsers with a very noticable increase in speed.

    Recommendation: Check your PHP version...hope it helps you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic