[squid-users] Different cache_dir based on object types

Amos Jeffries squid3 at treenet.co.nz
Fri Aug 4 02:58:08 UTC 2017


On 04/08/17 08:52, Antony Stone wrote:
> On Thursday 03 August 2017 at 20:25:59, ♥ NiNJA ♂ wrote:
> 
>> Hi friends
>>
>> I have a server with Dual Xeon cpu , 64GB ram , [2] 256GB SSD and [4] 2TB
>> HDD
> 
> Er, congratulations.
> 
>> Is there anyway to config Squid to store objects in different
>> cache_dir based on object types ?
>>
>> For example storing video files (mp4 , mkv ...) into first hard disk
>> Storing windows update files into second hard disk
>> Storing js , css , html files into third hard disk
>> And etc ...
> 
> I have no idea how you might achieve this (maybe others have) but... why do
> you want to do this?

Not as such. HTTP deals in representation payloads, not files.

You can tune each cache_dir to contain objects within a certain size 
range using the min-size= and max-size= parameters.
<http://www.squid-cache.org/Doc/config/cache_dir/>

Amos


More information about the squid-users mailing list