Let Util.Cache() tell the script if the result is from cache or not
First of I really like the Util.Cache(() => DoSomething(), "key").
What I wanted to ask though was if it was possible to incorporate something like:
I have 2 uses for this.
The first being I'd like to throttle my fetcher if it's not cached.
I'd like to be able to clear the cache if I don't like the results and try again from non cache.
What I wanted to ask though was if it was possible to incorporate something like:
String Util.Cache(Func<String> dataFetcher, String key, out Boolean cached)
I have 2 uses for this.
The first being I'd like to throttle my fetcher if it's not cached.
I'd like to be able to clear the cache if I don't like the results and try again from non cache.
Comments