[squid-users] refresh_pattern and same objects

Marcus Kool marcus.kool at urlfilterdb.com
Tue Sep 1 22:57:04 UTC 2015



On 09/01/2015 03:57 PM, Yuri Voinov wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> This is bad idea - to cache the same gifs with unique parameters. They keeps unchanged for one HTTP-session in best case. You cache will overloads with this small same gifs with unique parameters.
> Only store ID saves this situation. In other hand, you must cache all Internet and all it variations. Yes, Vary is evil. But web-masters which is fight against caching is more evil.

trackers may be evil and you may use a powerful weapon to kill them all, but I assume that you do not want innocent victims, like the few gifs that actually have a different image depending on the 
parameter.

> 02.09.15 0:16, Marcus Kool пишет:
>>
>  >
>  > On 09/01/2015 03:08 PM, Yuri Voinov wrote:
>  >>
>  > Better to write store-id rule which cut off parameters and store gif.
>  >
>  > Something like this:
>  >
>  > ^https?:\/\/(.+?)\/(.+?)\.(js|css|jp(?:e?g|e|2)|gif|png|bmp|ico|svg|web(p|m))
>  > http://$1.squidinternal/$2.$3
>  >
>  > And, of course, universal rule for store_id_access.
>  >
>  > > I think that this works well for trackers gifs but not for other gifs with parameters.
>  >
>  > Store ID is powerful instrument for deduplication cache story. Which
>  > permits not to use terabytes disks.
>  >
>  > 02.09.15 0:00, Marcus Kool пишет:
>  > >>>
>  > >>>
>  > >>> On 09/01/2015 05:14 AM, FredB wrote:
>  > >>>> More precisely
>  > >>>>
>  > >>>> I reduced the ttl of the first line
>  > >>>>
>  > >>>> refresh_pattern -i \.(htm|html|xml|css)(\?.*)?$ 10080 100% 10080
>  > >>>> #All File 30 days max
>  > >>>> refresh_pattern -i
>  > \.(3gp|7z|ace|asx|bin|deb|divx|dvr-ms|ram|rpm|exe|inc|cab|qt)(\?.*)?$
>  > 43200 100% 43200 ignore-no-store reload-into-ims store-stale
>  > >>>> refresh_pattern -i
>  > \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v)|arj|lha|lzh|zip|tar)(\?.*)?$
>  > 43200 100% 43200 ignore-no-store reload-into-ims store-stale
>  > >>>> refresh_pattern -i
>  > \.(jp(e?g|e|2)|gif|pn[pg]|bm?|ico|swf|dat|ad|txt|dll)(\?.*)?$ 43200 100%
>  > 43200 ignore-no-store reload-into-ims store-stale
>  > >>>> refresh_pattern -i
>  > \.(avi|ac4|mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rm|r(a|p)m|snd|vob)(\?.*)?$
>  > 43200 100% 43200 ignore-no-store reload-into-ims store-stale
>  > >>>> refresh_pattern -i
>  > \.(pp(t?x)|s|t)|pdf|rtf|wax|wm(a|v)|wmx|wpl|cb(r|z|t)|xl(s?x)|do(c?x)|flv|x-flv)(\?.*)?$
>  > 43200 100% 43200 ignore-no-store reload-into-ims store-stale
>  > >>>
>  > >>> trackers use a 1x1 gif extensively and they usually have parameters,
>  > e.g.
>  > www.example.com/track.gif?browser=chrome&allsortsofdata&random=RANDOMNUMBER
>  > >>> and these trackers are not cacheable since the parameters are never
>  > the same.
>  > >>> So for gif, I suggest to
>  > >>>
>  > >>> refresh_pattern -i \.gif$   43200 100% 43200 ignore-no-store
>  > reload-into-ims store-stale
>  > >>> refresh_pattern -i \.gif\?  0 0% 0
>  > >>>
>  > >>> Marcus
>  > >>> _______________________________________________
>  > >>> squid-users mailing list
>  > >>> squid-users at lists.squid-cache.org
>  > >>> http://lists.squid-cache.org/listinfo/squid-users
>  >
>  >>
>  >> _______________________________________________
>  >> squid-users mailing list
>  >> squid-users at lists.squid-cache.org
>  >> http://lists.squid-cache.org/listinfo/squid-users
>  >>
>  > _______________________________________________
>  > squid-users mailing list
>  > squid-users at lists.squid-cache.org
>  > http://lists.squid-cache.org/listinfo/squid-users
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBCAAGBQJV5fU0AAoJENNXIZxhPexGQZsIAL2/UW7K9HzbwP166GAFiERe
> 12fm9Y7BL9ryw9JMF3sKcq0qvUXvLc4liCVAQLzl8VLbVrF59xJMSXc7ljCy2iCE
> Str2h6mzIOklPyyFctvl1vq8J3upRH7EsN6oZn99RM1Y3ICxhO6aV1pgHGAnF4TS
> 166LJeBrJVGwc+gWo1V+LL1oGem5U2RMkQNBgFTzpAcQAYv60ai0tz9OExO6LRKD
> vl9lGFVIQ/wMBU1jbbKZGLBDReqgmZnl25kqfVc8zWyu1zMt6cb3ZaRYeCVrEX6q
> MhFG+sOMLhk6OPaNiuqftdAXZ4UUjvRN951X1kWTe18D/LFfh31sGwUiyZxb04U=
> =P8m3
> -----END PGP SIGNATURE-----
>
>
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>


More information about the squid-users mailing list