jiangyi1985 / 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)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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));

About

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)


Languages

Language:C# 100.0%