Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B45E07F4D for ; Thu, 11 Aug 2011 08:48:30 +0000 (UTC) Received: (qmail 69591 invoked by uid 500); 11 Aug 2011 08:48:30 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 69160 invoked by uid 500); 11 Aug 2011 08:48:27 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 69144 invoked by uid 99); 11 Aug 2011 08:48:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 08:48:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.174] (HELO mail-iy0-f174.google.com) (209.85.210.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 08:48:20 +0000 Received: by iyf40 with SMTP id 40so907601iyf.5 for ; Thu, 11 Aug 2011 01:47:59 -0700 (PDT) Received: by 10.42.117.5 with SMTP id r5mr6719951icq.278.1313052479135; Thu, 11 Aug 2011 01:47:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.165.1 with HTTP; Thu, 11 Aug 2011 01:47:39 -0700 (PDT) In-Reply-To: References: From: Jason Smith Date: Thu, 11 Aug 2011 15:47:39 +0700 Message-ID: Subject: Re: Futon Test Suite To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 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 succeed. 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