• Resolved texaun

    (@texaun)


    Great plugin…does almost everything I need. But have two page cache questions for anyone that can help with my transition from Super Cache.

    I need to NOT cache the front page (i.e., is_front_page) for some websites. Of course, for most WordPress users the front page and home page are the same, but my blog page (is_home_page) is NOT the homepage. What syntax do I use for the front page in “never cache the following pages” settings…Super Cache has a checkbox item for that setting.

    Does the garbage collection setting also drive page cache expiry? If I set garbage collection for 300 seconds will that also determine when that page needs to be refreshed in the cache.

    Thanks in advance for the help!

    https://www.ads-software.com/extend/plugins/w3-total-cache/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter texaun

    (@texaun)

    Through trial and error and “going back to Apache school”, I figured out the code required in the “never cache the following pages” settings box to not cache the home page when a site’s blog page (is_home_page) and front page (is_front_page) are different is:

    ^/$

    FYI, it’s in the Apache mod_rewrite documentation at the end of the RewriteCond section.

    I still hope someone can give me an answer on the garbage collection question…

    Thread Starter texaun

    (@texaun)

    And now I understand cache duration for pages, etc. It’s driven by the cache control policy and header lifetime. Cache control policy set to “cache with max-age” and expires header set to 300 seconds does exactly what I was seeking…sets browser cache to 300 second duration and page cache to 300 second duration.

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    You can disable the cache home page option on the page cache settings tab.

    Thread Starter texaun

    (@texaun)

    Thanks for responding Frederick. I recognize that and maybe I need to clarify my question and correct “is_home_page” syntax to “is_home”.

    I use WordPress as a CMS for some sites and the homepage is a static page instead of a posts page. For those sites, the homepage is “is_front_page”, but it is not “is_home”…see https://codex.www.ads-software.com/Function_Reference/is_front_page.

    I assume W3TC provides a direct to “is_home” (i.e., the posts page) in the page caching option that prevents homepage caching, but I need it to provide a direct for “is_front_page”. Using “^/$” in the “never cache the following pages” box resolves the problem and a static homepage is not cached.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: W3 Total Cache] W3TC: Don't cache front page & page expiry time’ is closed to new replies.