[squid-users] Dynamic/CDN Content Caching Challenges

Amos Jeffries squid3 at treenet.co.nz
Thu Apr 14 13:48:49 UTC 2016


On 15/04/2016 1:18 a.m., Muhammad Faisal wrote:
> Hi Amos,
> As you mentioned "Better to Store-ID cache the thing its Location header
> is pointing to." The problem is Location header has random strings in
> the URL that caused unique URL for the same object.
> Location:
> http://fs37.filehippo.com/9546/46cfd241f1da4ae9812f512f7b36643c/vlc-2.2.2-win64.exe
> 
> 
> Random string in the URL "/9546/46cfd241f1da4ae9812f512f7b36643c"
> 
> I was trying to deal with this situation.

I think you are missing the point of Store-ID.

Store-ID helper is simply the process of removing such randomness from
the URL - to point all possible permutations of the URL(s) at one cache
slot (aka ID). De-duplication of duplicate cache objects - nothing more.

The Store-ID is a text string naming the cache slot where the object is
stored. It can be anything but is important that your custom ones not
accidentally match a real possible URL - the ".squid.internal" piece in
the helper output is used for that.


That long and sometimes difficult analysis I wrote about is needed to
ensure that it truely is randomness that can be dropped and does not
have any meaning that affects the object in the response. If you drop
something that is not actual randomness then you end up with wrong
client responses sometimes - usually nasty results.

Amos



More information about the squid-users mailing list