• Resolved Christopher Rosenberg

    (@christopherrosenberg)


    Hi there,

    many thanks for this plugin.

    I just installed it (site at WPE) and saw that all caching values show “1 hour”. I assume these are not the current values but your default numbers? Just want to know to make sure and be careful. In any case it would be quite interesting to see the current values for the respective caches to be able to to increase or decrease from there. Also, it would be helpful if you could provide some best-practice values or general recommendations for the different settings.

    Another thing: This smart cache sounds somehow scary to me because 6 months is a pretty long time and when a page wasn’t updated for four weeks it might be updated in the fifth week and then wouldn’t be delivered to the users for 6 months, am I right?

    Cheers,

    CR

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ethan Kennedy

    (@ethankennedy)

    Hey Christopher!

    The 1 hour times are defaults, and are set when the plugin is installed, so those are the current cache times. They can be dropped to 10 minutes (which is the WPE default), or increased to however long you’d like. I’d recommend however long you feel comfortable with, the longer the cache the less the site hits the back end.

    WP Engine has built in cache purges associated with updates, so in the case of the smarter cache, the Varnish cache would be purged and new content would be displayed to users. This would be the case for any extended cache time. The only thing to look out for would be more organic changes not associated with a post update, like maybe side bars or headers, but in those cases it’d be a good call to just go ahead and purge everything using the button in the WP Engine dashboard.

    Let me know if you have any other questions, thanks so much for trying the plugin out!

    Thread Starter Christopher Rosenberg

    (@christopherrosenberg)

    Hi Ethan,

    Thank you very much for your quick reply, greatly appreciated!

    I would have some more questions on this:

    1) Am I right that these values affect the browser cache as well? If so, would the the mentioned concept to reload updated pages still work? It sounds like this only works for the (purged) Varnish cache.

    1b) If the settings of the plugin doesn’t affect the browser cache, how can I set the values for the browser cache?

    2) I just noticed in the headers of my pages “expires: Wed, 11 Jan 1984 05:00:00 GMT” – is that a correct/usual setting or is this an issue? (I don’t know if this behavior is related to the plugin)

    3) I read that in the page headers there should be some x-cache values, but I can only find “x-type: default”. Is that a correct/usual setting or is it an issue? (I don’t know if this behavior is related to the plugin)

    Bonus question ?? I noticed that on my iPhone the same page loads crazy fast compared to the desktop and I have the feeling that this is because of better browser caching. Can I achieve a similar behavior on desktop browsers?

    Thank you very much,

    CR

    Plugin Author Ethan Kennedy

    (@ethankennedy)

    Hey Christopher!

    1) It does, but in my experience it doesn’t affect content nearly as often as it does static assets, which the plugin doesn’t control. Last-Modified headers can also ensure this behavior as it’ll add a header that the browser then uses to know for sure if the content has changed or not. I am unfortunately a lot less well versed in browser cache behavior, but this has been my experience when troubleshooting. Let me know if it differs from yours.

    2) That is not controlled by the plugin, the plugin just deals with Cache Control and Last Modified headers. Those headers are set to make sure all browsers don’t cache responses when WordPress doesn’t want it to. You can see that method here: https://developer.www.ads-software.com/reference/functions/wp_get_nocache_headers/ (It’s also Matt Mullenweg’s Birthday)

    I don’t respect those headers on posts in the current version when logged in, which can lead to some browser weirdness, but I will push an update to fix that in the very near future. (I was only thinking about varnish when I wrote it originally)

    3) That is also something set in the Varnish configuration, and not something that has introduced any weird behavior I have known of. It gets set in the varnish config to provide more information around what part of the config it’s ran through in my understanding.

    It’s possible that is the case, in a lot of cases a site can be faster on mobile because it’s loading less content. I would recommend using webpagetest.org to get a better perspective though. In the advanced settings I’d recommend no traffic shaping, and at least 3 runs (makes sure you get a good picture of cache). In the other tabs you can alter it to replicate a mobile browser. That will show you the performance differences in a nice waterfall chart.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Settings’ is closed to new replies.