couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: Futon Test Suite
Date Thu, 11 Aug 2011 08:47:39 GMT
On Thu, Aug 11, 2011 at 2:29 PM, Robert Newson <> wrote:
> I wonder if we should add a custom request header like
> X-CouchDB-NoCache which sets all the cachebusting headers (Expires in
> the paste, etc) rather than that hack.

There are several reasons for an invalid (cached) response.

* reverse-proxies
* forward proxies
* transparent forward proxies
* Browsers

People are testing couch in these and probably other environments,
knowingly and unknowingly.

I am not so sure that setting headers into the past would fix things
in enough cases. The point of the ?_=$RANDOM (used in jQuery and RoR
also) is because querying a completely different URL is the only way
to be sure of a cache miss.

Indeed, Varnish's "pain pill" sales pitch is, "put me in front of your
slow web app and it will become faster." Well, that is because
Varnish, prudently, disregards all of your server's cache metadata and
basically caches everything it can. And people love it for that. (Yes,
you can configure Varnish properly, but I am describing the pain-pill
scenario where Rails is crashing under load.)

I guess my point is, the test suite should work through caching
proxies, and cache-busting based on headers is AFAIK unlikely to

If, however, CouchDB did support a mechanism to make everything as
un-cacheable as possible, I would rather see it as a _config setting
rather than a header. Adding headers to queries is a way to invalidate
an oauth signature. And, I don't know, for debugging and
troubleshooting, if you command CouchDB to act funny, I'd rather that
command to persist there in the config rather than I have to discover
it myself in Wireshark.

Iris Couch

View raw message