Why Squid doesn't cache everything
- Often people wonder why they run Squid but no files/objects seem to get fetched directly from the cache instead of from the internet. These are some common causes:
Not every object is cacheable
- Please make sure the objects in question is really cacheable. This is most frequently misunderstood! This is not a setting of your Squid but a setting of the web server that provides the object. You may check here whether Squid is allowed to cache the object:
http://www.ircache.net/cgi-bin/cacheability.py To learn how caching works in general consider reading http://www.mnot.net/cache_docs/
Check your store.log
- From the FAQ: Cached responses are logged with the SWAPOUT tag. Uncached responses are logged with the RELEASE tag. However, your analysis must also consider that when a cached response is removed from the cache (for example due to cache replacement) it is also logged in store.log with the RELEASE tag. To differentiate these two, you can look at the filenumber (3rd) field. When an uncachable response is released, the filenumber is FFFFFFFF (-1). Any other filenumber indicates a cached response was released.
Check the caching ratio
- I have provided configuration files to monitor a Squid cache through
Cricket (see: [17]http://workaround.org/squid/cricket/). This should quickly give you an idea if just some objects don't get cached of if you have a general problem.
