How do I delete a cache entry? #711
Answered
by
CodeDredd
vikaskedia
asked this question in
Q&A
-
I am using cache as per the docs at: https://pinia-orm.codedredd.de/guide/repository/retrieving-data#caching Suppose I get a list of users with a query like: const users = useRepo(User).useCache().get() After 1 minute the user changes his email address and I want to delete the cache entry. How do I do that? |
Beta Was this translation helpful? Give feedback.
Answered by
CodeDredd
Dec 13, 2022
Replies: 1 comment
-
Well there a three options.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vikaskedia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well there a three options.
useRepo(User).cache().clear()
useRepo(User).cache().delete('key')
useRepo(User).cache().forEach((key, value) => ...)