What causes 'Cache entry is expired' messages

1,168 views
Skip to first unread message

richardw...@gmail.com

unread,
Apr 22, 2014, 8:45:26 AM4/22/14
to mod-pagesp...@googlegroups.com
I've been looking at the PageSpeed Console and browsing the content of /mod_pagespeed_message and I'm getting lots of 'Cache entry is expired' messages.
The console is showing that historically about 40% of cache lookups were expired.

Apache isn't doing anything with Cache-Control headers (perhaps that's the problem).

How does PageSpeed decide that a cache entries should expire?

Thanks.


Joshua Marantz

unread,
Apr 22, 2014, 8:58:33 AM4/22/14
to mod-pagespeed-discuss
It's based on the origin TTL of your resources.  If you have not specified any cache-control headers, then it defaults to 5 minutes.

Is that consistent with what you are seeing int he logs?

If you set your cache-control headers via something like:
<FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
  Header set Cache-control "max-age=3600"
</FilesMatch>

then the cache expiry would be one hour.

-Josh


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/cbb7ed55-0b7f-46fb-8307-7ac024e82114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

richardw...@gmail.com

unread,
Apr 23, 2014, 5:14:46 AM4/23/14
to mod-pagesp...@googlegroups.com
I've added the cache-control header and the console is showing expired cache lookups have dropped from 40% to just above zero and the mod_pagespeed_message is looking a lot cleaner.

Thanks for the advice.
Reply all
Reply to author
Forward
0 new messages