/AutoRefreshCache.net

An in-memory key/value cache that: 1. load data on first access (thread block) 2. automatically refresh data when cache entry expires (in async thread)

Primary LanguageC#

AutoRefreshCache.net

Sample:

return AutoRefreshCache.Instance.GetOrRegisterNew<string>("testkey", key =>
             {
                 Thread.Sleep(5000);//some heavy work
                 return "test value created at " + DateTime.UtcNow + " for key: " + key;
             }, TimeSpan.FromSeconds(10));