Search squid archive

Re: Different replacement policy for different filenames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/05/2015 1:54 a.m., Veiko Kukk wrote:
> 
> On 07/05/15 15:16, Amos Jeffries wrote:
>> On 7/05/2015 11:16 p.m., Veiko Kukk wrote:
>>> 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
> 
> Hi,
> 
> I'm trying to have different cache replacement policy for different
> files, based on filename. To avoid bigger files pushing some smaller
> files (more important files) out from cache in case of LFUDA and at the
> same time have high byte hit rate for bigger files. I could achieve this
> if squid could be configured to sort files based on filename/url into
> different cache folders.

There you go. Your problem statement is phrased in terms of sizes - "big
files", "little files".

cache_dir sectioned with min-size / max-size options using different
replacement policy in each will do as close to what you need as is possible.


PS. One can;t use "filename" because there is no such thing as "file" in
HTTP. Only messages and objects with URLs. Any given URL can present a
wide range of different sized objects. Any semblance to "files" is an
illusion.


Amos

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux