0

In my angular Js application I am fetching data from pouchdb synced with couchbase sync gateway.I have set rev_limit to 5 in sync gateway config file. while syncing in pouchdb through sync gateway all revisions of each document are getting synced in pouchdb,so size of pouchdb is increasing,I want to sync only latest document in pouch rather to sync all revisions.

Can you please help in this or please suggest me any improvment I need to do

Thanks

swat
  • 71
  • 7

1 Answers1

0

There are two ways of doing this. Impose the compaction when you create DB

var db = new PouchDB('mydb', {auto_compaction: true});

Compact on demand

db.compact();
Greatran
  • 180
  • 3
  • 18