Re: acl on reply codes?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 01 Mar 1999 22:42:03 +0100

ryan nelson wrote:

> to keep track of a user's language (spanish/english/portugese), we set
> cookies, and, if a user hits our frameset, and doesn't have a language
> cookie, they're given a redirect to the "please tell us what language
> you speak" page... that's via a 301 document moved reply.

I would suggest changing the web server to be cache friendly.

1. Do content negotiation by returning a 302 "moved temporarily"
redirect, redirecting the browser to the negotiated resource.
2. Never return user-dependent cachable content on the same URL.

> is there such a thing as an acl that matches on the reply code?

Not that I know of.

> acl REDIRECTS reply_code 301
> no_cache REDIRECTS

301 is "Moved permanently" and is cached unless denied by the origin
server.
302 is "Moved temporarily" and is only cached if allowed by the origin
server.

> acl INVISIBLE_CGI_ERRORS reply_code 505
> no_cache INVISIBLE_CGI_ERRORS

Errors are negatively cached. Set negative cache timeout to 0 and errors
will not be cached.

---
Henrik Nordstrom
Spare time Squid hacker
Received on Mon Mar 01 1999 - 14:22:27 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:06 MST