couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: How to identify new docs in the _changes feed?
Date Thu, 23 Jun 2011 18:13:43 GMT

On Jun 22, 2011, at 6:31 PM, Jason Smith wrote:

> _changes is a false prophet.
> The best bang-for-buck with the _changes feed is cache invalidation: A
> change is a *hint* that you might want to check something out, but it
> is (IMHO) not generally the primary trigger to execute some code.

Could you explain that in more detail? In particular, what is it that makes _changes unreliable?
Could something be changed [sic] to make it more reliable/useful?

> In your case: Require all new docs to have a field "is_new: true".
> That is very easy to confirm in the validator:

I’m writing a generic framework, not a specific app. I can’t make any assumptions about
the document schema, that’s up to the application. This specific task is just to map the
_changes feed to Cocoa NSNotifications so the client app can act on them.

View raw message