-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalidate All Cache #76
Comments
You can do this by clearing the cache manually. Here's an example:
Then when you logout, you just call
and you can start with a clean slate |
Thanks @Helaers But I have been following axis-extensions github's doc and cannot understand where to use the reset() function when using cacheAdapterEnhancer. There is nothing about invalidating the cache in axios-extensions's doc or can you point me to a additional doc I didn't see ? I'm using axis & axis-extensions with VuejS. I create my axios' instance like that:
I'd like to be able to do something like Thanks a lot |
@crawazaky If you want to use the approach above you'll probably have to disable the cache by default...
Then define your own cache with via
Add that to you endpoint:
And when you want to clear the cache you created, call the reset function on
I hope this helps. |
Is there any way for resetting all cached items? For example when user logout, i wanna reset cache.
The text was updated successfully, but these errors were encountered: