Skip to content

ICacheManager GetCacheKeys

陈明旭 edited this page Apr 5, 2019 · 2 revisions

Welcome to the Materal wiki!

Home Materal Materal.CacheHelper ICacheManager

List<string> GetCacheKeys();

简介


获得缓存中的所有键。

返回类型


List<string>

示例


ICacheManager cacheManager = new MemoryCacheManager();
string inputString = Console.ReadLine();
const string cacheKey = "MyKey";
const double saveHours = 1;
cacheManager.SetByAbsolute(cacheKey, inputString, saveHours);
List<string> allKeys = cacheManager.GetCacheKeys();
return allKeys;