-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow a validation function for retrieving cached values #13
Comments
For |
This is something we want too, and consider addressing in a bit, as we have a fair deal of semantically (if not technically) empty responses that take a while to flush out of our caches at the moment. |
What if the |
|
Am I missing something, for thinking that the current call signature ( Or is @khoomeister talking about a presenter function that lets us condense the api call value and save something parsed in the cache instead of the literal response – with overloaded behaviour semantics for letting, say, Something like that (with a clean api) would be useful too, but perhaps as its own independent feature. I have specifically wanted to cache not just the response body, but also bits from response metadata passed in subsequent callback args from |
@johan Yes, |
cool @jkrems, i was more concerned with how much validation functionality to include 😃 - your proposed interface sounds good to me. |
There should be an optional validation function for
get
andgetOrElse
operation. If the data fails the validation function, it should count as a cache miss. If the validation function throws, it should count as a get error.The text was updated successfully, but these errors were encountered: