I just installed 3.3.8 on Ubuntu 14.04. However I found that squid3 never caches any statics images file at all.
Here is my squid3.conf
auth_param digest program /usr/lib/squid3/digest_file_auth -c /etc/squid3/passwords
auth_param digest realm proxy
acl authenticated proxy_auth REQUIRED
acl local src 127.0.0.1/32
acl ukpro src "/etc/squid3/ukip.txt"
http_access allow ukpro
http_access allow local
http_access allow authenticated
http_port 3128
cache_dir ufs /var/spool/squid3 3072 16 256
minimum_object_size 1 KB
maximum_object_size 1 MB
cache_swap_low 87
cache_swap_high 90
memory_pools off
netdb_filename none
pinger_enable off
#refresh_pattern -i .jpg$ 0 60% 1440 ignore-no-cache ignore-no-store reload-into-ims
#strip_query_terms off
refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 1440 100% 525949 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-must-revalidate ignore-private ignore-auth
And here is the log that always shows TCP_MISS/200 (same image url):
1414349354.186 644 127.0.0.1 TCP_MISS/200 97198 GET http://heartmindandseoul.com/wp-content/uploads/2013/03/squid3.jpg - HIER_DIRECT/173.254.28.23 image/jpeg
1414349358.061 500 127.0.0.1 TCP_MISS/200 97198 GET http://heartmindandseoul.com/wp-content/uploads/2013/03/squid3.jpg - HIER_DIRECT/173.254.28.23 image/jpeg
1414349359.782 624 127.0.0.1 TCP_MISS/200 97198 GET http://heartmindandseoul.com/wp-content/uploads/2013/03/squid3.jpg - HIER_DIRECT/173.254.28.23 image/jpeg
1414349377.096 659 127.0.0.1 TCP_MISS/200 97198 GET http://heartmindandseoul.com/wp-content/uploads/2013/03/squid3.jpg - HIER_DIRECT/173.254.28.23 image/jpeg
1414349725.175 652 127.0.0.1 TCP_MISS/200 97198 GET http://heartmindandseoul.com/wp-content/uploads/2013/03/squid3.jpg - HIER_DIRECT/173.254.28.23 image/jpeg
1414349727.522 514 127.0.0.1 TCP_MISS/200 97198 GET http://heartmindandseoul.com/wp-content/uploads/2013/03/squid3.jpg - HIER_DIRECT/173.254.28.23 image/jpeg
Can anyone please give me some suggestion? Thank you.
Best Answer
Removing
minimum_object_size
resulted in an instant HIT, first in memory and later on disk after restarting the server, I can't really explain why (this makes no sense as the image is way bigger than that) but at least that solves your issue.