namespace: Serenity assembly: Serenity.Net.Core
Reads the value of given type with specified key from the local cache. If the value doesn't exist or not of given type, it returns null.
public static TItem TryGet<TItem>(this IMemoryCache cache, string cacheKey)
where TItem : class
parameter | description |
---|---|
TItem | Expected type |
cache | Cache |
cacheKey | Key |
- class TItem
- class MemoryCacheExtensions