You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Simon Metson <si...@googlemail.com> on 2010/02/02 16:31:16 UTC
Access Etag in a list
Hi,
If I access a view or list in my browser I see an Etag is set. Is it
possible to access the value of the Etag set for a view in a list
call, or access the Etag CouchDB sets for a list? I can't see this in
the wiki docs or the book and the head and req passed into the list
function don't contain it.
Cheers
Simon
Re: Access Etag in a list
Posted by Chris Anderson <jc...@apache.org>.
On Tue, Feb 2, 2010 at 7:31 AM, Simon Metson <si...@googlemail.com> wrote:
> Hi,
> If I access a view or list in my browser I see an Etag is set. Is it
> possible to access the value of the Etag set for a view in a list call, or
> access the Etag CouchDB sets for a list? I can't see this in the wiki docs
> or the book and the head and req passed into the list function don't contain
> it.
The Etag is calculated based on the function body and the view index
sequence num. If it matches, CouchDB doesn't even need to run the JS
code.
There's not a good reason why it's not in the req object, except I
can't see what it'd be useful for
--
Chris Anderson
http://jchrisa.net
http://couch.io