[squid-users] cache file format

Amos Jeffries squid3 at treenet.co.nz
Fri Sep 4 13:25:13 UTC 2015


On 4/09/2015 11:06 p.m., Xen wrote:
> I was assuming the files saved to the cache dir would just be plain
> files as they were fetched. Am I mistaken? It seems weird that when I
> run a 'file' on them, most of them are reported as "data" without
> discrimination.
> 
> I remember from Squid 3.5 on Windows that I could take a file and open
> it in an image viewer and high chance it would be a jpg or png. I am
> currently running 3.5.7 on Linux (self compiled).
> 
> Does Squid store extra data in the files in the header?.

Squid cache files contain a binary TLV format. TLV is pretty common for
intros to files, so some viewers could be skipping the Squid TLV data
and trying to sniff the type of content in the final data portion. But
that should contain a full HTTP response message headers and all - not
an image.

Amos



More information about the squid-users mailing list