• Hi !
    I’am using the page cache with memcache extension. My question is ? what is the lifetime of a cached page ? Did the “Maximum lifetime of cache objects:” options in the advanced page cache setting determine the lifetime of a cached page ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter todiadiyatmo

    (@todiadiatmo)

    For example if i have custom page template, and the page template fetch custom WP Queries, does my custom page template will “expire” in certain amount of time ?

    Yes, you are correct that the “Maximum lifetime of cache objects” under Page Cache would be used to determine how long arbitrary data is stored. This would only be available to page cache methods that are not disk or disk enhanced (so this would indeed work for memcached servers).

    As for being page-specific…although that feature is not presently in w3tc it would be fairly easy to put it in since the Max lifetime is just a variable that is assigned directly to cache processing functions like ->set() for say memcache. I guess the simplest way would be to create it into a usable wordpress filter (or is it an action) that way people could hook into it via there functions.php and by doing a simple check what the existing page is being displayed it would then assign whatever new/different lifetime (in seconds) to use.

    Granted this approach would be a bit techy for most people’s taste but at least the feature would be in and available for the more adventurous types.

    Thread Starter todiadiyatmo

    (@todiadiatmo)

    I have check the source code, and your explanation is correct ! Thank You !

    I also agree with your idea to create a filter , i put pull request on the unofficial w3tc here :
    https://github.com/szepeviktor/fix-w3tc/pull/50

    Awesome update!

    Prince_Dhaval

    (@shethdhaval)

    Hey guys i m using this plugin and it is working good but i dont know if we use cache then why its not calling the functions.php file of active theme.
    for example people from us can visit the site then they can see some other content and other visitor from rest of countries can see different content as well but due to cache i can not achieve these
    if do you have any idea then please let me know

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lifetime of a cached Page’ is closed to new replies.