コード例 #1
0
ファイル: MemoryCacheManager.cs プロジェクト: smorey2/KFrame
 public static void Touch(this IMemoryCache cache, string[] names)
 {
     if (names == null || names.Length == 0)
     {
         return;
     }
     foreach (var name in names)
     {
         if (name.StartsWith("#"))
         {
             CacheFile.Touch(name);
             continue;
         }
         cache.Set(name, EmptyValue, new MemoryCacheEntryOptions().SetAbsoluteExpiration(DateTimeOffset.MaxValue));
     }
 }