[squid-users] Dynamic content
Amos Jeffries
squid3 at treenet.co.nz
Fri Jul 3 10:01:50 UTC 2015
On 3/07/2015 8:36 p.m., Jiri Wetter wrote:
> Hello,
>
> I have problem with caching of dynamic content.
>
> I verified conditions which have to be met in order to cache dynamic content here: http://wiki.squid-cache.org/SquidFaq/InnerWorkings#How_come_some_objects_do_not_get_cached.3F
> and also check by online tool https://redbot.org/
> Result is that my page can be cached but it doesn't work with my current settings. Therefore I would like to ask you for help with my configuration.
>
> OS: Ubuntu 12.04.5 LTS
> Squid Cache: Version 3.1.19
> configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm,' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-extern
al-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-arp-acl' '--enable-esi' '--enable-zph-qos' '--enable-wccpv2' '--disable-translation' '--with-logdir=/var/log/squid3' '--with-pidfile=/var/run/squid3.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' --with-squid=/build/buildd/squid3-3.1.19
>
> Works: http://wiki.squid-cache.org/ConfigExamples/DynamicContent?action=fullsearch&context=180&value=test&titlesearch=Titles
Cache-Control:max-age and Expires place explicit storage time on the object.
> Works: http://pechal.net/?q=apple&sp_staged=1&sp_cs=UTF-8
Date + Last-Modified allow heuristic age estimation to provide an
estimate storage time for the object.
> Doesn't work: http://sony_playstation_dev.guided.lon5.atomz.com/?q=sony&sp_staged=1&sp_cs=UTF-8 - Why?
Lack of all headers (Cache-Control, Expires, Last-Modified, Age)
extending/placing bounds on object freshness beyond current time point
(Date) makes it stale immediately.
This is a special case for dynamic content due to its nature of being
re-generated on demand / dynamically each request.
Static content with the same headers Squid can safely assume up to 1
year freshness (but default is 1 week to avoid problems).
Amos
More information about the squid-users
mailing list