private TFuncResult ExecuteCacheOrGet <TRequest, TResult, TFuncResult>(
     IStoredProc <TRequest, TResult> sp,
     TRequest parameters,
     Func <TFuncResult> getResultFunc)
 {
     return(EnableCache(sp)
         ? _cache.GetOrCreate(
                sp.GetParameters(parameters).CreateCacheKey(sp.StoredProcedureName),
                sp.CacheLifetime,
                getResultFunc)
         : getResultFunc());
 }
 private TFuncResult ExecuteCacheOrGet <TRequest, TResult, TFuncResult>(
     IStoredProc <TRequest, TResult> sp,
     TRequest parameters,
     Func <TFuncResult> getResultFunc,
     string cacheKey = "")
 {
     return(EnableCache(sp)
         ? _cache.GetOrCreate(string.IsNullOrEmpty(cacheKey) ?
                              sp.GetParameters(parameters).CreateCacheKey(sp.StoredProcedureName) : cacheKey,
                              sp.CacheLifetime,
                              getResultFunc)
         : getResultFunc());
 }