Jump to content

Recommended Posts

Posted

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?

Thanks.

http://schools.saltmoney.org/content-pages/responsible-borrower-program-a-proactive-approach-to-student-debt-and-delinquency/

Posted

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
Posted

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?

Posted

Or in a cached template:

<?php echo time(); ?>

Then reload the page several times - the value should not change because the output is cached :)

  • Like 1
Posted

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.

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...