Jump to content

Template caching not working?


Recommended Posts

Hi all,

I'm trying to improve performance on one of the ProcessWire sites my agency manages, and having some problems with it.

The template that the page below has a cache setting of 86400, with the default sub-settings (clear only the changed page, etc.)

However, when I look at the Request headers I see that Cache-Control is set to max-age=0, and in the Response headers Cache-Control is set to no-store, no-cache, must-revalidate, post-check=0, pre-check=0, Expires is set to Thu, 19 Nov 1981 08:52:00 GMT and Pragma is set to no-cache.

Am I missing something about how template caching works?



Link to comment
Share on other sites

Hi evanmcd

Template caching does cache the template output (db queries, php processing etc.)

This has nothing to do with the headers.

Also the caching is disabled if you're logged in, so you could try another browser or log out to check if you see any improvements.

  • Like 1
Link to comment
Share on other sites

Hmm, I see.  Thanks for the info.  I was logging out before testing, but thanks for pointing that out.

So, there's no way to validate that the caching is working, other than just observing the load time with and without caching on?

Link to comment
Share on other sites

OK, makes sense.  I've been looking into this after running my page through the Google PageSpeed and Yahoo YSlow tests, and I see now that this is really a different thing, it being server side as opposed to browser cache (as they are evaluating).

Thanks guys.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...