Re: [squid-users] squid in accelerator mode: invalidation of site contents

From: Amos Jeffries <squid3@dont-contact.us>
Date: Mon, 09 Jul 2007 21:56:52 +1200

Kinkie wrote:
> On 7/2/07, martin sarsale <runa@dwebsite.com> wrote:
>> Dear all:
>> We're developing the new version of our CMS and we would like to use
>> squid in accelerator mode to speed up our service.
>>
>> From the application side, we know exactly when the data changed and we
>> would like to invalidate all cached data for that site. Is this
>> possible? maybe using squidclient or something.
>>
>> We can't do this purging url by url since it doesn't makes much sense
>> (and we don't have the url list!). We want to wipe out every cached
>> object for mysite.com.
>
> You can't do that on the squid side either, since squid doesn't index
> objects by URL but by hash. The only way is to PURGE the relevant
> object.
>
> You can reduce quite a lot the window of staleness by specifying in
> every response the HTTP header:
>
> Cache-Control: s-maxage=XXX, public, proxy-revalidate
>
> (reference taken from: http://www.mnot.net/cache_docs/)
> by choosing the right XXX value (the time in seconds before the object
> expires) you'll be able to find the right balance between higher load
> on the backend (smaller values of XXX) and higher chance of serving
> stale content (higher values of XXX)
>

Just be careful you leave empty the Expires: header. It can prevent IMS
requests from refreshing the content.

Amos
Received on Mon Jul 09 2007 - 03:56:57 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Aug 01 2007 - 12:00:03 MDT