public string GetMessageFromModuleCache(string functionName, string key) { _cachingStrategyContext.SetStrategy(_cachingModuleStrategy); string retStr = ""; string loadingStr = ""; string strCacheKey = string.Concat(functionName, "-", key); var objCache = _cachingStrategyContext.CacheGetFromKey(strCacheKey); if (objCache != null) { loadingStr = "\n**(cached data^)**"; retStr = (string)objCache; return(string.Concat(loadingStr, retStr)); } return(string.Empty); }
public object GetDataFromRepositoryCache(string functionName, string key) { CachingStrategyContext _CachingStrategyContext = IResolver.Current.CachingStrategyContext; CachingRepositoryStrategy _CachingRepositoryStrategy = IResolver.Current.CachingRepositoryStrategy; _CachingStrategyContext.SetStrategy(_CachingRepositoryStrategy); string strCacheKey = string.Concat(functionName, "-", key); var objCache = _CachingStrategyContext.CacheGetFromKey(strCacheKey); return(objCache); }