clearCache()
MyModel.clearCache(
/* {key|Array<key>}. -- optional. One or several keys to remove from the cache */
<key>
).then( ... );const User = require('./user.model');
const key1 = User.key(123);
const key2 = User.key(456, ['Ancestor', 'default']);
User.clearCache([key1, key2])
.then(() => {
// Not only the 2 keys have been removed from the cache
// but also any Query linked to the entity kind "User".
// Read the cache documentation for more information on this.
});Last updated
Was this helpful?