/// <summary> /// Get element(s) from cache /// </summary> /// <typeparam name="T"></typeparam> /// <param name="cacheKey"></param> /// <param name="action"></param> /// <returns></returns> protected T GetFromCache <T>(string cacheKey, Action action) { T output = default(T); if (CacheEngine.Exists(cacheKey)) { output = CacheEngine.Get <T>(cacheKey); } else { action(); } return(output); }