Recently installed Google's plugin mod_pagespeed and I want to use it exclusively to address image optimization.
So far the result frim Pagespeed insights has been hit or miss. Half the time it does fine, the other half it complains that I should "Leverage browser caching for the following cacheable resources." - with a long list of nearly every image on my home page cached at the 5 minute default.
Now I've read that this can sometimes happen if the module hasn't completely finished rendering the cached version and that it will serve a temporary image with a short cache in the interim. But I can't understand why that would be the case since the images have not changed and they are the same images it only just 10 minutes ago said were fine.
So as far as I can see:
- the images are there in the cache and being served without issue
- the image files have not changed so the cache should remain valid
I am running Apache 2.4.18 and mod_pagespeed 126.96.36.199-0. The config file pagespeed.conf is configured with the following two lines toward the bottom before the
ModPagespeedRewriteLevel PassThrough ModPagespeedEnableFilters rewrite_images,extend_cache_images
Can anyone suggest an explanation for what looks to be a persistently expiring cache?