WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Strange transient problem (5 posts)

  1. ramon fincken
    Member
    Posted 3 years ago #

    I have a problem, I store data as transient for 7 days.

    When running a file in the root (where index.php is) I can do:

    // Some loop here for each transient I need:
    var_dump(get_transient($transient_key));

    However .. if I do the exact same thing in an admin plugin page it returns falses !

    How can I fix this?
    Memcached is turned on and stores, pages/objects/database. Default settings for lifetime.

  2. ramon fincken
    Member
    Posted 3 years ago #

    Fred. asked me if this still was the case when W3TC was turned off. it is! So it appears that this is not a W3TC problem.

    This is the code, works fine on my warm_cache.php file in the root, but not in my admin plugin page.

    $statdata = get_option('plugin_warm_cache_statdata');
    $keep_time = 60*60*24*7; // 7 days
    foreach($statdata as $key => $value)
    {
    	if($key >= time()-$keep_time)
    	{
    		$newstatdata[$key] = $value;
    
    echo "<br><br>$value<br>";
    var_dump(get_transient($value));
    	}
    }

    Expected result

    plugin_warm_cache1290259187
    array(5) { ["url"]=> string(43) "http://www.mijnpress.nl/
    * snip
    ["pages_count"]=> int(21) ["time"]=> float(15.3015730381) }

    Result in admin page:

    plugin_warm_cache1290259187
    bool(false)
  3. ramon fincken
    Member
    Posted 3 years ago #

    I've disabled W3TC, renamed the dropins and dropins from other cache plugins and now the problem is gone.

    Enabling step by step to find out what caused this.

  4. ramon fincken
    Member
    Posted 3 years ago #

    Problem is in the object cache of W3TC

  5. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    So when object caching is disabled all is ok?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic