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