Пример #1
0
 public static CacheItem CreateCacheItem <TModel>(this IModelKeyGenerator keyGenerator, object id)
 {
     return(new CacheItem(keyGenerator.Create <TModel>(id)));
 }
Пример #2
0
 public InMemoryCacheProvider(IModelKeyGenerator keyGenerator)
 {
     ModelKeyGenerator = keyGenerator;
 }
Пример #3
0
 public static CacheItem CreateCacheItem <TModel>(this IModelKeyGenerator keyGenerator, long id) where TModel : IModelKey <long>
 {
     return(new CacheItem(keyGenerator.CreateKey <TModel>(id)));
 }