-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Manually setting cache #194
Comments
Sorry for the delay, just got around to this. The plugin doesn't expose But I guess we could expose it, will try to tackle it this week. PR is welcome as well, thanks for reporting this. |
Thanks for the response! And, now I owe you an apology for the delay 😆 Would exposing it be as simple as adding something like |
Hello, it is the other way around. Sorry, I didn't find the time to work on it, busy with vee-validate at the moment. It is as simple as you suggested. But how would you set the cache yourself? Would you pass an object containing the cachPlugin.setCacheResult = function (operation, result) {
// getQueryKey imported from utils
const key = operation.key || getQueryKey(operation);
setCacheResult({ key, ...operation }, result);
} |
Hello, thanks again for the response. No apologies are needed!
Yes, that's exactly how I was thinking we would do it. Is there anything that I can do to help move this forward? |
Feel free to PR it if you have the time, I know it's a 1 liner but I usually do open-source on weekends and whenever I can sneak in work days. I will take it on by the weekend if you won't have the time. |
Great! PR submitted at #198. I hope that helps. |
@logaretm do you have a chance to review the above PR? Thanks! |
Hello,
We are looking to achieve something very similar to issue #29. In reviewing https://villus.logaretm.com/plugins/cache/#clearing-cache, it seems like one should be able to call
cachePlugin.setCacheResult(...)
, but my initial attempts following the example throwsTypeError: j.setCacheResult is not a function
. Is this expected?The text was updated successfully, but these errors were encountered: