static MemoryCacheTests() { for (int i = 0; i < 1000; i++) { var val = i.ToString(); DictSm[val] = val; SlimCacheSm.Set(val, val, ExpiresDt); SysCacheSm.Add(val, val, Expires); ExtCacheSm.Set(val, val, Expires); } //for (int i = 0; i < 100_000; i++) //{ // var val = i.ToString(); // DictMd[val] = val; // SlimCacheMd.Set(val, val, ExpiresDt); // SysCacheMd.Add(val, val, Expires); // ExtCacheMd.Set(val, val, Expires); //} //for (int i = 0; i < 1_000_000; i++) //{ // var val = i.ToString(); // DictLg[val] = val; // SlimCacheLg.Set(val, val, ExpiresDt); // SysCacheLg.Add(val, val, Expires); // ExtCacheLg.Set(val, val, Expires); //} }
public object ExtGetSmObject() => ExtCacheSm.Get("123");
public void ExtSetSm() => ExtCacheSm.Set("1234", "1234", Expires);
public string ExtGetSm() => ExtCacheSm.Get <string>("123");