WordPress.org

Ready to get started?Download WordPress

Forums

APC Object Cache Backend
[resolved] Cache does sometimes not refresh (5 posts)

  1. Bernhard Riedl
    Member
    Posted 2 years ago #

    Hi Mark,

    Maybe you could shed some light on the following strange issue:

    I have a bunch of WordPress installations (3.1 and 3.2) running on a Debian Squeeze with PHP 5.3.3-7, APC 3.1.3p1 and the development version of your APC plugin. If I update a setting (e.g. timezone) on one of my WordPress instances (single as well as multi-user network), the previous setting will not changed until I empty the APC user cache entries.

    The default user_ttl is set to 0 and the apc-monitoring-tool apc.php shows no ttl, too:

    for example:
    wp:4299c432235aea4625c72c0c01d09d89:1:options:alloptions Ttl 0

    Any help is appreciated.

    cheers,
    Berny

    http://wordpress.org/extend/plugins/apc/

  2. Bernhard Riedl
    Member
    Posted 2 years ago #

    After some tests, it seems that for posts, pages, etc. the apc-cache-entry is updated on every change. Moreover, a call to update_option() works correctly as the following code delivers a fresh result if called for example in the init-hook.

    <?php
    $rand=rand();
    
    update_option('bogus', $rand);
    echo(get_option('bogus'));
    ?>

    Though, I still have the issue in the WordPress Admin Menu and now it really gets strange: The settings TimeZone, Date Format, Time Format, Week Starts On and Site language on https://mydomain.com/wp-admin/options-general.php are written to the database on update but the cache is not updated. Other options on the same page like Site Title or Tagline are updated correctly in the database and the cache.

    I've also tested my plugins which use the WP 2.7 Settings-API and all of them update all options just fine in the database and the cache.

    So I can rule out a bug in APC itself and start thinking that this issue is also not related with the APC Object Cache Backend plugin but rather caused by a bug in WordPress core.

    Could anybody please test this behavior and provide me with some feedback.

    greetz,
    Berny

  3. Mark Jaquith
    WordPress Lead Dev
    Plugin Author

    Posted 2 years ago #

    Berny — Try the version of the APC backend in /trunk/

    http://svn.wp-plugins.org/apc/trunk/

    I just made some updates last night, and one of them was a weird bug where some sorts of numerical values would refuse to be stored in APC.

    If the problem still persists, please narrow it down the smallest code snippet that reproduces the problem so I can look into it!

  4. Bernhard Riedl
    Member
    Posted 2 years ago #

    Hi Mark,

    Thanks for your feedback and the update. - I've installed 2.0.2b on our staging-server.

    According to the cache-entries alloptions is NULL now. - Thus, for example, changing the timezone-setting - as described before - works, though without any caching.

    fyi: As you've pumped the minimum-requirement, you should probably also adopt the error-message 'The APC object cache backend requires PHP 5.2 or higher' to 5.2.4.

    Today I had the chance to test a similar setup on a windows server with your plugin 2.0.2 and APC 3.1.6. - It seems that there all cache-entries get updated just fine.

    I thought I can rule the APC cache itself out, but maybe after all it's a bug in APC. - The behavior is confusing and errors are hard to reproduce...

    So first of all, I will request an update of APC on our Debian staging-server and get back to you with further results.

    Greetz,
    Berny

  5. Bernhard Riedl
    Member
    Posted 2 years ago #

    Hi Mark,

    Good news. :) After compiling and updating APC to version 3.1.9 and a running a few tests during the last week everything works fine with your plugin 2.0.2 (stable).

    I can still only speculate because the results are hard to reproduce, but it seems that either APC 3.1.3p1 itself or the combination of Debian Squeeze with PHP 5.3.3-7 and APC 3.1.3p1 caused this issue.

    Greetz,
    Berny

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags