public static bool TryGetCache <T>(this ILocalCache cache, string cacheKey, out T val, DateTime?expiry = null) { object obj; if (cache.TryGetCache(cacheKey, out obj, expiry)) { val = (T)obj; return(true); } val = default(T); return(false); }
protected override bool TryGetCache <TRtn>(string cacheType, string cacheKey, out TRtn rtn, Type rtnType = null) { return(_dictCache.TryGetCache <TRtn>(GetCacheKey(cacheType, cacheKey), out rtn)); }