Search squid archive

Re: Cache settings per User Agent?

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

 



On tis, 2008-10-07 at 23:02 +0800, howard chen wrote:

> On Tue, Oct 7, 2008 at 8:11 PM, Henrik Nordstrom
> <henrik@xxxxxxxxxxxxxxxxxxx> wrote:
> > Best done by the origin server using the Vary header and Cache-Control:
> > max-age..
> >
> 
> It can't, since it will confuse my squid to cache the page for normal
> user.

No, it won't.

Your server when seeing a request from one of the spiders responds with

Vary: user-agent
Cache-Control: max-age=72000

Or whatever age you want for the search content..

If you can throw an ETag or Last-Modified in there as well, and have the
server react reasonably on If-None-Match / If-Modified-Since conditional
requests then even better but that's a bonus.

If the request is NOT from one of these spiders you respond with
personalized content and headers looking as:

Vary: user-agent
Cache-Control: private

Regards
Henrik

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux