0

I use squid to cache some big files. And I want to make sure if these big files are in squid's cache. But I just don't want to download the file, then go to squid log to find this. That will take too much time and squid resource.

Is there are cheap method to check this? I can't find any method in squidclient, squid cache manager, and wget to do this.

Leon
  • 173
  • 2
  • 9
  • it seems that "Intercache protocols" are designed to solve this problem. here are some of them: ICP, HTCP, Cache Digests, and CARP. I think Cache Digests is more suit me. I can get squid's cache digest from http://squid-server-ip:3128/squid-internal-periodic/store_digest . But I did find a tool to parse or test URI against the store_digest I got. Anybody know some kind of these cache digest testing tool? – Leon Feb 16 '11 at 08:26

2 Answers2

1

Maybe a bit late for the OP, but can't you just make a HEAD request for the large resource and check the response headers to see if you got a cache hit?

Mark Slater
  • 111
  • 2
0

I think the purge utility mention in this question may do what you want. The utility mentions Squid v2 explicitly, so I don't know whether or not it will work with Squid v3. It has options for listing the contents of the cache (-e) and for extracting files from the cache (-C -e).

larsks
  • 43,623
  • 14
  • 121
  • 180