WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Object cache breaks my custom archives (13 posts)

  1. gazpachu
    Member
    Posted 2 years ago #

    I've programmed custom archives with this URI structure:

    http://domain.ext/news/archives/year/month/day

    And this is the code for the "day" (the one that is not working with object cache...):

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Any idea of what could be wrong? It works perfectly when object cache is disabled.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. gazpachu
    Member
    Posted 2 years ago #

    The question here is: "How to disable caching for archives"

    I've tried setting "news/archives/" in "Never cache the following pages" under the "page cache" tab but that didn't work

  3. gazpachu
    Member
    Posted 2 years ago #

    The source code: http://pastebin.com/SqPqgXHr

  4. gazpachu
    Member
    Posted 2 years ago #

    I've also couldn't find information about "Non-persistent groups". What are those? how can I setup new groups?

  5. gazpachu
    Member
    Posted 2 years ago #

    The thing is, it used to work fine before... that's why I've decided to check Trac and I've found this in the "w3-total-cache-config.php" file:

    'objectcache.reject.uri' => array(
    0 => '/news/archives',
    ),

    Somehow, this information cannot be edited in the "object cache" tab of the current version of W3TC.

    Any ideas?

  6. gazpachu
    Member
    Posted 2 years ago #

    I've found the origin of the problem:

    The new version "Version 0.9.2.4" deleted the "never cache the following pages" under the "object cache" configuration page.

    May I ask why it was deleted? is there a workaround?

  7. gazpachu
    Member
    Posted 2 years ago #

    I still need an answer to this problem

  8. gazpachu
    Member
    Posted 2 years ago #

    Still couldn't find a way to disable object caching for the archives section :(

  9. theroundwell
    Member
    Posted 2 years ago #

    Any luck with this?

  10. gazpachu
    Member
    Posted 2 years ago #

    No, the problem still there and I have to keep the object cache disabled :(

  11. cyonite
    Member
    Posted 2 years ago #

    You could perhaps add the constant define('DONOTCACHEOBJECT', true); in your archives.php template file?
    Check FAQ How can I prevent caching directly in my templates etc? for more settings.

  12. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    @gazpachu are you all set?

  13. gazpachu
    Member
    Posted 2 years ago #

    Yes!, the define('DONOTCACHEOBJECT', true); worked.

    Thank you guys ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic