couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: View cache invalidation
Date Wed, 11 Apr 2012 19:02:19 GMT
Hi Julien,

This is a bug in your view, rather than a problem with CouchDB. A view
is built by reading the _changes feed for the database, and only
updates to documents will cause their corresponding rows in the view
to be recalculated. This is all by design.

If you give more details, we can help you fix your view. Someone has
already noted the general shape of the solution, emitting the
timestamp in the key and selecting slices with startkey/endkey.

B.


On 11 April 2012 14:50, Aurélien Bénel <aurelien.benel@utt.fr> wrote:
>> What are the implications of doing this?
>
> MapReduce provides you with a very efficient cache mechanism but to work, views must
be completely context-independent.
>
>> What can we do to still keep our views with up to date data?
>
> Set your one week slot outside the view definition: either in the view URL (with startkey/endkey)
or in a list.
>
> Regards,
>
> Aurélien

Mime
View raw message