When I use Etag I need to hit the DB for content and generate the hash every single page load in order to determine if page is modified or not. I would like to avoid this. We would like to refresh the cache very 15 minutes regardless if content is modified or not. This avoids hitting the db each time. Rather have squid handle the cache logic and not have it done in php. Can I do this without using the ETag like this? Date: $now Last-Modified: $now Cache-Control: max-age:6300 how is max-age calculated? 6300 is not seconds. Andy On Thu, Jan 27, 2011 at 2:23 AM, Matus UHLAR - fantomas <uhlar@xxxxxxxxxxx> wrote: > > On 21.01.11 15:52, Andy Nagai wrote: > > As a developer I need to know how to control individual page caching. I > > heard from somebody to add a expire meta tag to refresh the cache. > > > > Two things I need to do: > > > > 1) prevent caching for certain pages > > 2) set the cache refresh rate for the rest of the pages. Would like to > > refresh pages every 15 minutes. > > Much more effective is to provide proxies way to tell server which version > of page do they have and check if it's still fresh. > > Learn how the If-Modified-Since and Etag: headers work. And of course the > Cache-Control... > > I think the only case where you really need page that is not cached is where > you put the current timestamp into the (x)html instead of using e.g. > javascript. > > -- > Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/ > Warning: I wish NOT to receive e-mail advertising to this address. > Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. > "Where do you want to go to die?" [Microsoft]