[squid-users] GET/POST caching

From: Stefan Palme <kleiner@dont-contact.us>
Date: Mon, 05 Dec 2005 15:18:49 +0100

Hello,

does squid distinguish between GET and POST URLs? I have an HTML form
(as part of a CMS) that will be first requested by "GET /form.html".
When the user submits the form, a "POST /form.html" will be made,
including the form data in the body of the request.

I want to "GET" request to be cached, because the result is always the
same (an empty form), but I want the response to the "POST" request
not to be cached.

Is it enough to put a

  acl POSTs method POST
  no_cache deny POSTs

in squid.conf?

I guess, the first GET request will made squid cache "/form.html",
and the next POST will find the cached object. The no_cache directive
just says not to cache the response from the origin server, but I
guess it does not prevent squid from looking in the cache if there
is already a "/form.html"...

regards
-stefan-
Received on Mon Dec 05 2005 - 07:18:55 MST

This archive was generated by hypermail pre-2.1.9 : Sat Dec 31 2005 - 12:00:02 MST