Search squid archive

Re: squid-users Digest, Vol 29, Issue 21

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

 



On 12/01/2017 3:55 a.m., Vidyadhish Joshi wrote:
> Amos, thank you for the details.
> Need pointers for caching the dynamic contents. My app has static n dynamic
> cache n static am able to cache it . For dynamic the URL is getting
> appended with query string.  Is there a way to cache dynamic contests n
> what would be configuration changes to cache dynamic ones.

Sure;

* Use the latest 3.5 version you can. There have been small but
important improvements across the whole series.


* Make sure you _do not_ have the old Squid-2 QUERY ACL denying storage
('cache deny QUERY' line in squid.conf) for those objects.


* Make sure your refresh_pattern lines _do not_ contain ignore-auth,
ignore-no-cache, ignore-must-revalidate, ignore-no-store or
override-lastmod.
 - you can add store-stale if you want to increase the caching further.


* Make sure you _do_ have these Squid-3 default refresh_patterns. The 0
value's are important to be 0. The other numbers you can change as wanted:

  refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
  refresh_pattern .               0       20%     4320


* Make sure your server produces appropriate caching options indicating
how long the content is to be cached. Specifically either Expires or
Cache-Control:max-age=N indicating when it will next change, or
Cache-Control:must-revalidate to require constant REFRESH.
 see <https://tools.ietf.org/html/rfc7234> for more details


* Your server should also produce Last-Modified and/or ETag headers for
content it generates. And handle the If-* request headers on received
requests to produce 304 responses when the content is unchanged.
 see <https://tools.ietf.org/html/rfc7232> for more details

 - when the server properly handles these If-* headers you can add the
refresh_pattern option refresh-ims and/or reload-into-ims to further
increase caching. (Until the server properly revalidates these options
are useless.)


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