[squid-users] Enable caching

Andrey K ankor2023 at gmail.com
Wed Apr 5 10:07:45 UTC 2023


Hello,

Previously, caching was disabled on our proxy servers. Now we need to cache
some content (files about 10 MB in size).
So we changed the squid.conf:

#Disable caching
#cache deny all
#no_cache deny all
#cache_mem 0

cache_dir ufs /data/squid/cache 32000 16 256 max-size=12000000

We have 24 workers on each proxy.

We saw that some requests were taken from the cache, and some were not.
The documentation says:
"In SMP configurations, cache_dir must not precede the workers option and
should use configuration macros or conditionals to give each worker
interested in disk caching a dedicated cache directory."

I found Amos' comment that "rock cache type *is* SMP-aware" (
http://lists.squid-cache.org/pipermail/squid-users/2018-October/019410.html)
So we switched to a rock cache_dir:
cache_dir rock /data/squid/cache 32000 max-size=12000000

Now everything seems to be working fine in the test environment, but I
found limitations on the RockStore (
https://wiki.squid-cache.org/Features/RockStore):
"Objects larger than 32,000 bytes cannot be cached when cache_dirs are
shared among workers."

Does this mean that RockStore is not suitable for caching large files?
Should I switch back to the UFS and configure 24 cache_dirs (this will lead
to a significant consumption of disk space)?

Kind regards,
      Ankor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20230405/afb0b696/attachment.htm>


More information about the squid-users mailing list