Skip to content

How do I delete a cache entry? #711

Answered by CodeDredd
vikaskedia asked this question in Q&A
Discussion options

You must be logged in to vote

Well there a three options.

  1. You could just clear the complete cache by using useRepo(User).cache().clear()
  2. If you know the cache key you can just delete the cached entry: useRepo(User).cache().delete('key')
  3. Iterate through the cache entries and update the specific models. useRepo(User).cache().forEach((key, value) => ...)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vikaskedia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants