conditional caching and cache querying
If I want cross-execution (being able to F5, F5, F5) cache certain fetched web pages (only if they actually return a 200ish result). I can't make use of the existing very helpful cache method options.
I don't want a failed attempt to be cached, and I want to be able to cache all
successes.
I'd like it if we could have the following signature off the existing Util class T CacheIf<T>(string key, Func<T> f, Func<T,bool> predicate, byref<bool> fromCache)
also very useful IsCached(string key)
.
A work around would be to litter the code with throws and try/catch.
1
vote
Maslow
shared this idea