Re: [squid-users] How to cache a PUT request?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 28 Nov 2013 18:32:55 +1300

On 28/11/2013 6:16 p.m., aditya agarwal wrote:
> Hey Eliezer,
>
> Thanks for the nice explanation :). I knew that Squid only caches the replies/responses as I had gone through the code. But I was wondering if there is small tweak that we can do in the code to enable caching of PUT request's body. But what I understand from your reply is that it won't be an easy task?
>

Correct. It wont be easy.

The operations necessary to cache PUT objects is to create a BodyPipe
node of client-streams that takes the StoreEntry for the URL location in
cache and fills it with the request payload, then checks the PUT
response to see if it is both accepted by the server and where the final
storage URL is using Location header sent back.
 You also have to prevent the server response payload being added to or
overwriting the StoreEntry data. Squid code currently assumes all over
the place that StoreEntry is fully manipulable by any response handling
code.
 You also have to figure out what the timing (Date, Last-Modfied, etc)
should be used and add those as the metadata on the cached object. This
is not always easy.

Easy enough to list, but coding is another matter.

Amos
Received on Thu Nov 28 2013 - 05:33:02 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 28 2013 - 12:00:06 MST