Stale Views

27 views
Skip to first unread message

Dominique Legault

unread,
Sep 23, 2014, 7:54:24 PM9/23/14
to mobile-c...@googlegroups.com
Hello All,

I'm having an issue with my views rendering stale documents on a phonegap app running couchbase lite. If I go to another page and come back to the same page the view renders correctly. this happens on almost all the pages I view. I tried adding the parameter indexUpdateMode: "before" to my view queries but it has no effect. The documentation of the REST API for views is blank. http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/design-document/get---db--design--design-doc--view--view-name-/index.html

on the php docs it has a stale: false value http://www.couchbase.com/autodocs/couchbase-php-client-1.1.5/classes/Couchbase.html#method_view I tried this but I don't think it has an effect either.

What is the preferred method to ensure all views are up to date when I query them.

Is there any way I can render the views upon new data entering into the db ? rather than when I go to view them.

Thanks,
Dominique

Jens Alfke

unread,
Sep 24, 2014, 1:08:59 AM9/24/14
to mobile-c...@googlegroups.com

On Sep 23, 2014, at 4:54 PM, Dominique Legault <deefac...@gmail.com> wrote:

I'm having an issue with my views rendering stale documents on a phonegap app running couchbase lite. If I go to another page and come back to the same page the view renders correctly. this happens on almost all the pages I view.

Can you be more specific about what's wrong (including indicating what OS you're on)?

In particular, do you mean that you issue a GET of /db/_design/ddoc/_view/view and get back obsolete data? That would be a bug; if so, please file a bug report.

on the php docs it has a stale: false value

That's for Couchbase Server. Similar API but they've changed a number of things including the handling of 'stale'. Don't use Couchbase Server docs for reference to Couchbase Lite (or the Sync Gateway for that matter.)

What is the preferred method to ensure all views are up to date when I query them.

That's the default behavior.

—Jens
Reply all
Reply to author
Forward
0 new messages