Search squid archive

Re: How to cache a PUT request?

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

 



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






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

  Powered by Linux