[squid-users] Different replacement policy for different filenames

Amos Jeffries squid3 at treenet.co.nz
Thu May 7 12:16:01 UTC 2015


On 7/05/2015 11:16 p.m., Veiko Kukk wrote:
> Hi
> 
> I'd like to apply different replacement policy for different filenames.
> I have searched through the documentation and found that replacement
> policy can be defined only per cache_dir[s] and squid can sort into
> different cache_dir's based on file size, but not based on file name.
> Maybe I have missed some of the documentation, so that is why I'm asking
> here.
> 
> Is it possible to sort into cache_dir's based on filename (some regex
> will do)? The result I'm trying to achieve is that certain files which
> names are known, but size varies (and overlaps with other files) are
> replaced with heap GDSF while all the other files are replaced with heal
> LFUDA policy.
> 
> Can this be done with squid?

No. Replacement policy is a type of hash table for a cache_dir such that
the single entry that is most obsolete can efficiently be found and
discarded at the time point where cache runs out of space. The whole
data structure for the cache_dir index is different for each mechanism.

Why are you wanting this? What are you actually trying to do?

Amos



More information about the squid-users mailing list