Home

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:
String Util.Cache(Func 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

Sign In or Register to comment.