curl-library
Re: Pragma: no-cache
Date: Wed, 12 Nov 2008 10:34:39 +0100
On Wed, Nov 12, 2008 at 09:10, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 11 Nov 2008, Dan Fandrich wrote:
>
>> I've wondered why Pragma: no-cache is the default at all. IMHO, if the
>> application wants specific caching behaviour, it can ask for it itself.
>> Turning off caching can result in slower accesses, after all.
>
> It was once upon the time put there among the default headers because I
> cloned the behavior of a browser request. It has since simply been tagging
> along for old times' sake. Perhaps the time has come to reconsider this and
> just ditch that default request header...
>
> I'm interested in thoughts and feedback on possible impacts a removal of
> this could bring.
It sounds a bit strange to turn off caching by default when going
through a proxy. 3 of the most common reasons for going through a
proxy are:
1) When the network can only be reached through the proxy
2) To filter data (e.g. privoxy)
3) To improve performance through caching (e.g. squid)
There are probably more other reasons for using a proxy than I can
think of, but for the three above there's no particular point in
having caching turned off (and for case 3 it would just be the wrong
thing to do).
I have an application where I've been telling everybody that when the
day comes where too much duplicate data is dragged through the network
we can just put in a local squid proxy. I didn't realise I would have
to change the code to reap the benefits..
The above assumes that I've actually understood what Pragma: no-cache
does, of course.
-Tor
Received on 2008-11-12