TransWikia.com

Find out why Squid isn't caching files

Super User Asked by Trevor Sullivan on October 26, 2020

I’m running Squid in a Docker container, thanks to the b4tman/squid image on Docker Hub.

Environment

  • Windows 10
  • Docker Desktop Linux VM
  • Testing with Chrome 85
  • Configured proxy in Windows 10 whole-system proxy configuration

Squid Configuration

  • I set the maximum_object_size 300 MB so that I could cache larger files.
  • I also configured a filesystem cache using cache_dir ufs /var/cache/squid 2000 16 256
  • Enabled large memory cache cache_mem 800 MB

However, when I try to download certain files, they aren’t being cached. I can tell, because the files are downloading again, on my slower internet connection.

I tried adding this line:

refresh_pattern -i .(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90% 432000 override-expire ignore-no-cache ignore-no-store ignore-private

Files That Are Cached

The files below ARE being cached by Squid, and download instantaneously.

Files That Are NOT Cached

The following files are NOT being cached in Squid.

Question: How can I discover why Squid isn’t caching certain files, while other files are being properly cached?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP