You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Automatic Cache Clearing in offline toolkit

Summary:

I'm trying to use this code, to clear pouchdb, however new PouchDB got me an undefined variable error. Appreciate if someone could guide me about vbcs dependency i got to add.

Version (include the version you are using, if applicable):

Version 24.10.1

Designer Version24.10.1-240830.1405.0863 313bb7 (2024-08-30 14:05:42)

Code Snippet (add any code snippets that support your topic, if applicable):

AppModule.prototype.clearCache = function() {
let cachelist = [ //specify the list ]
let pouchdbStore=[];
for(let i=0;i<cachelist.length;i++)
{
pouchdbStore.push(new PouchDB(cachelist[i]).destroy())
}
Promise.all(pouchdbStore).then(function () {
console.log('cache destroyed')
}).catch(function (err) {
console.log('not found');

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!