public static ICache GetCacheProvider(ICache iProviderDocument, Enumerations.Cache cacheType) { ICacheDependency dependency = new HttpCacheDependency(); dependency.CacheFile = CacheFile; dependency.CacheRefresh = CacheRefresh; switch (cacheType) { case Enumerations.Cache.Http: if (iProviderDocument == null) { iProviderDocument = (ICache)Activator.CreateInstance(typeof(HttpCacheAdapter), dependency); } break; default: if (iProviderDocument == null) { iProviderDocument = (ICache)Activator.CreateInstance(typeof(HttpCacheAdapter), dependency); } break; } return(iProviderDocument); }
public ICache GetInstance(Enumerations.Cache cacheType) { _IProviderCache = Utilities.GetCacheProvider(_IProviderCache, cacheType); return(_IProviderCache); }