W3 Total Cache
Object cache problems back? (10 posts)

  1. David Anderson
    Posted 2 years ago #

    In the days of W3 Total Cache, I used to see a lot of users (for the UpdraftPlus plugin, which I develop) who had their transients vanish. Transients set with a 9-hour expiry were not found when requested 5 minutes later with get_transient().

    This problem seemed to go away when was released.

    But now, it seems to be back - I'm seeing the same symptoms in users' reports/logs; some minutes after setting a transient that lasts for 9 hours, we attempt to retrieve it with get_transient() and there's nothing there.

    I'm wondering if this item in has anything to do with it?
    "Improved Object Cache purge policy performance"


  2. bikeboy888
    Posted 2 years ago #

    My object cache is not clearing also.
    I am using
    page cache - disk enhanced
    object cache - disk
    browser cache - on
    Garbage collection and expires header lifetime set to 1800 secs on all options.

    Cron GUI plugin shows tasks to clear cache in cron list, but the files are never cleared...and baloon in size.
    Manual clearing of cache from admin button works.
    I know its not only me....any updates on this

    latest versions of w3tc and WP

  3. David Anderson
    Posted 2 years ago #

    That's a different problem to this one. The problem in this thread is that transients set during cron runs with update_transient are sometimes no longer found (returns nothing with get_transient) during later cron runs.

  4. Frederick Townes
    Plugin Author

    Posted 2 years ago #

    The improvement was that the object cache is not purged as much anymore.

    When do you set the transients? Is it in backend, frontend, logged in, not logged in? Are users calling empty cache?

    Emptying Object Cache or all caches, the engine used for transients will remove the transients as well.

  5. David Anderson
    Posted 2 years ago #

    Hi Frederick,

    No emptying of the object cache is involved.

    My code runs during an action called via wp_schedule_single_event(). It sets a transient with update_transient(). The action itself re-calls wp_schedule_single_event() to invoke itself again 5 minutes later. This can happen various times. The re-called code calls get_transient() to get the data that was set earlier with update_transient(). Sometimes, get_transient() returns nothing (false/null).

    The problem is random, i.e. does not happen every time. However, testing it many times on various different sites establishes one common factor - the problem only ever occurs on site's where W3 Total Cache's object cache is active, and never occurs when it is turned off.


  6. rclai
    Posted 2 years ago #

    I am getting a problem with transients as well when I set a transient in a function hooked to a shortcode. I try to retrieve the transient in an ajax request, and it's not there. This problem doesn't happen when I have object caching off.

  7. Frederick Townes
    Plugin Author

    Posted 2 years ago #

    I assume you meant set_transient? And also that is just together with wp-cron? Which cache engine do you use? We'll look into cron and transients some more.

  8. Birgir Erlendsson (birgire)
    Posted 2 years ago #

    I got similar problems with set_transient() with version 0.9.3 installed.

    The function get_tranisent() was always returning false no matter what.

    By reverting back to it started working normal again.


    My setup is:

    page cache - apc
    object cache - apc
    browser cache - on

  9. David Anderson
    Posted 2 years ago #

    Hi birgire,

    This thread is a bout a different problem, which happens during WP_CRON, and exists in too. I've seen your problem (APC/outside WP_CRON/0.9.3) too, but you should start a separate thread for it as it's a separate problem.


  10. Birgir Erlendsson (birgire)
    Posted 2 years ago #

    Hi, David Anderson

    ok, sorry about that.

    I haven't used the Updraft plugin and you didn't mention wp-cron in your question and it sounded very similar to my w3tc object cache + transient problem ;-)


    ps: any way I found this


    that might be related to the problem I'm seeing and/or related to yours?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic