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?
Thanks,
Aditya
On Thursday, 28 November 2013 10:32 AM, Eliezer Croitoru <eliezer_at_ngtech.co.il> wrote:
Hey Aditya,
The main issue is that squid caches responses.
PUT is there to "UPLOAD" the file from the client to the service.
While squid is a http caching service it is based on "response" caching
rather then other kinds of caching.
A PUT request is not like POST request by the nature of it.
A POST request should result with a response based on some information
from the client while PUT is there to send data from the client to the
service which there is not way to "cache" in squid.
I would try to demonstrate it with a math example:
"1 + 1 = 2" (this is what we use and know)
we can use the same knowledge that allows "1 + 1 = 2" to also say that
"12 + 2 = 14" and also that 14 can come from "12 + 2" but once we say
"14" there are couple possibilities that can lead to "14".
The next thing is to guess one by one from all the possibilities that
leaded "14" to make sure it is one of them.
While trying each and one of the possibilities we will reach it
eventually there is no other way to "know" that it was "12 + 2" else
then take a wild couple guesses.
And since Squid is not in the "Sorcery" area yet it would not try to be
an "Orcale" that tries to guess what the client wants to send to the
service.
(All the above is a nice metaphor that should describe the complexity of
the task.)
Best Regards,
Eliezer
On 28/11/13 06:25, aditya agarwal wrote:
> Hi,
>
> We are planning to use Squid as a cache manager in our project.
> Can you please tell me how can I enable caching of PUT request's body so that later we can retrieve it using GET?
>
> I am using Squid Version 3.3.10.
>
> Thanks,
> Aditya
>
Received on Thu Nov 28 2013 - 05:19:18 MST
This archive was generated by hypermail 2.2.0 : Thu Nov 28 2013 - 12:00:06 MST