On Thu, 6 Nov 2003, Zhou Hong wrote: > I am now working on to add function module of caching web services to > squid 2.5. Since the soap requests of web service use POST and squid > marks the POST request nocache, I have to find where to modify the > manipulation of POST
Squid does not cache POST replies as it is uncertain under which conditions a POST reply may be cached. Most uses of POST depends heavily on the contents of the POST request entity. If your goal is to make POST cacheable then there is a couple of things you need to do, assuming this caching is dependent on the POST request data: * Modify how request entities are forwarded, temporarily buffering the entity so you can process the request entity before the request is forwarded. * Extend the public storeKey hashed data with information as required to give each POST request/reply which should be cached uniquely a unique store key. * Remove the flag which makes POST requests uncacheable (look for METHOD_POST). > I also encounter the following question when looking into codes, and > need your help, > 1) Where to get POST request content body? See httpSendRequestEntry() for an example. > 2) Besides url, which other things are selected to form the hash key. See storeKeyPublicByRequest() > 3) What is the difference between storeSetPrivateKey and > storeSetPublicKey, I mean What scenarios do we use private key and > public key respective in. Every object in Squid must have a unqiye key identifying the object to Squid. Objects which should not be shared with other clients use private keys, shareable objects use public keys. All objects start out private and when Squid determines the response may be cached the key is changed to the public key.
