Clear Cache not clearing image files in /files/cache directory
- /pages (directory)
- 2ca2a8118779c299a1d85f5dd6c6dbfa.jpg (large number of image files like these)
- zend_cache---a585562d2598e0ce2add1afe2b37cb67da34707df9f15ff2b70e33d4caf3c522 (few of these)
- zend_cache---internal-metadatas---a785562d2598e0ce2add1afe2b37cb67da34707df9f15ff2b50e33d4caf3c921 (few of these)
When I Clear Cache from the Dashboard, everything else clears up from /files/cache directory except for the image files. That's around 40-50M of data there that would not clear. I thought Clear Cache is supposed to clear the entire content of /files/cache.
Most of these websites are running 188.8.131.52.
A quick look at the code shows that it clears:
- The CSS cache
- Any page caches
- Block caches
- Overrides caches
and I think anywhere else output or code caching is used.
If you want to clean out those files you need to do it manually.
They're not cleaned out as I think it's perhaps something you'd only want to do if you are playing around with compression settings or something more technical. Otherwise every time you want to clear the cache to help refresh a bit of content, you'll be doing large numbers of delete, requiring a site to re-size hundreds/thousands of images.
Yes if I have a lot of images in the site that have been resized, then they will all have to be recreated after clearing the cache.
What if I want to clear only the images that are no longer used by any of the pages? Is there a better way to do this?
But it isn't clever enough to look for images in use and leave them in place.
What is the difference between 'stomp' and 'all'?
'expired entries' - Is it taken from Full Page Caching in Cache & Speed Settings and only works when Full Page Caching is on?
Expired entries - yes, as you surmise.