Skip to content

Instantly share code, notes, and snippets.

@lorensr
Created April 2, 2020 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorensr/20e65090467621eaacb712280b722789 to your computer and use it in GitHub Desktop.
Save lorensr/20e65090467621eaacb712280b722789 to your computer and use it in GitHub Desktop.
async update(id, newDoc) {
try {
await this.db.update(id, newDoc)
this.cache.delete(this.cacheKey(id))
} catch (error) {
this.didEncounterError(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment