Title: Page/Post Specific Cache Length
Last modified: April 3, 2019

---

# Page/Post Specific Cache Length

 *  Resolved [kbowson](https://wordpress.org/support/users/kbowson/)
 * (@kbowson)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/page-post-specific-cache-length/)
 * First, I’m sure you get this in most of your support requests… but your plugin
   is AWESOME. Would love to see more add-ons to further enhance speed on WPE in
   the future!
 * Second, if this already exists, I apologize, but could not find it.
 * WHAT I WAS LOOKING FOR/HOPING:
 * Was for a way to set a specific cache length for a page (specifically our homepage).
   The reason why, most of our pages literally NEVER change. So setting a crazy 
   high cache length makes sense. That said, for our homepage, it updates frequently,
   and I would like to set it to something lower.
 * Is there a way to do this?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11414265)
 * Thank you! I appreciate the feedback! There are some more things coming down 
   the pipeline at WP Engine that will impact performance that I am looking forward
   to, so hopefully you’ll get to take advantage of those.
 * I do understand the use case here, and it is something I would hope to implement
   for another reason in the future. In some themes the homepage isn’t associated
   with a post type, so the plugin never picks it up, so it defaults to 10 minutes.
   That would be a big use case for being about to increase the cache time, in addition
   to this one here.
 * That said, when a post or page is created, the homepage is purged as part of 
   that function, so if there is a feed or anything like that on the homepage, it
   should be getting the updated content. This would allow you to leverage the longer
   cache time while also getting that content live on the homepage that much faster.
 * Another option would be the “Smarter Cache” option and a smaller time. If the
   other pages aren’t updated, it’ll start setting the cache times to 6 months but
   won’t touch anything that’s been updated more recently.
 * Let me know if you’re seeing any challenges with either of those options, and
   I can see what I can do to help.
 * Thanks!
 *  Thread Starter [kbowson](https://wordpress.org/support/users/kbowson/)
 * (@kbowson)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11443694)
 * Hey Ethan,
 * I’m guessing it might be because we’re running CF too, but the homepage won’t
   seem to update unless I flush caches. That said, your Smarter Cache is a brilliant
   workaround. I honestly think that is better than what I was requesting. It does
   make the cache ‘smarter’ (nice naming-work there hah). It would allow us to get
   all the benefit of the increased cache length, without the downside of the site
   not updating!
 * Great option, and thank you for your help! I’m looking forward to the new things
   coming down the pipeline!
 * K
 *  Thread Starter [kbowson](https://wordpress.org/support/users/kbowson/)
 * (@kbowson)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11443706)
 * Hey Ethan, one question with this, does the smarter cache only work with posts/
   pages… or will it work with other stuff, for example:
 * – Custom post types
    – Rest APIs
 * K
 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11443828)
 * That sounds like it probably is cloudflare if I’d have to guess, their plugin
   has the ability to kill the cache when the “appearance of the site changes”, 
   so I’d try that and see if it helps with the stale content. Also try an incognito
   tab to make sure it isn’t chrome caching it if you haven’t already.
 * It does work for custom post types, but not rest routes. The cache for the routes
   is killed on updates too, so I don’t think it’d get much of a benefit outside
   of the normal cache increases. I’ll keep it in mind when I revisit that stuff
   though in the future.
 *  Thread Starter [kbowson](https://wordpress.org/support/users/kbowson/)
 * (@kbowson)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11444374)
 * Awesome, thanks Ethan.
 * Can you explain the cache on those APIs? It makes much more sense with posts /
   pages / cpts… I don’t really understand what caching the apis would do
 * K
 *  Plugin Author [Ethan Kennedy](https://wordpress.org/support/users/ethankennedy/)
 * (@ethankennedy)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11444655)
 * Yeah!
 * For the average person just using WordPress as a front end it probably won’t 
   make a difference, but if you’re using the APIs to pull content into a headless
   frontend or something like that, increasing the cache of those endpoints is super
   important.
 * The APIs are just like the concentrated version of your site’s content, so it
   makes even less sense to cache them for only a short amount of time, especially
   when they could theoretically do a lot of concurrency. In most cases it’s probably
   better to think of the posts/page cache and the APIs as an or solution instead
   of an and, since you’re probably only going to be getting the benefit out of 
   one or another at any point.
 * I am really excited about WordPress as a headless CMS, so allowing customization
   to the rest routes allows the plugin to be feature forward for something I am
   hoping takes off in the future.
 *  Thread Starter [kbowson](https://wordpress.org/support/users/kbowson/)
 * (@kbowson)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11445235)
 * Hah alright given I lost you in the first paragraph… I’m guessing messing with
   the rest APIs are not for me!
 * Thank you Ethan!
 * K

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Page/Post Specific Cache Length’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpe-advanced-cache-options_24677e.
   svg)
 * [WP Engine Advanced Cache](https://wordpress.org/plugins/wpe-advanced-cache-options/)
 * [Support Threads](https://wordpress.org/support/plugin/wpe-advanced-cache-options/)
 * [Active Topics](https://wordpress.org/support/plugin/wpe-advanced-cache-options/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpe-advanced-cache-options/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpe-advanced-cache-options/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [kbowson](https://wordpress.org/support/users/kbowson/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/page-post-specific-cache-length/#post-11445235)
 * Status: resolved