/// <summary> /// Augments .NET Framework ObjectCache and its descendants into /// Aspectacular-friendly cache provider compatible with the CacheAspect. /// </summary> /// <param name="cache"></param> /// <param name="cachePolicyTemplate">.NET Framework object driving cached item expiration.</param> /// <param name="regionName"></param> /// <returns></returns> public static ObjectCacheFacade CreateCacheProvider(this ObjectCache cache, CacheItemPolicy cachePolicyTemplate, string regionName = null) { var ocp = new ObjectCacheFacade(cache, cachePolicyTemplate, regionName); return ocp; }
/// <summary> /// Augments .NET Framework ObjectCache and its descendants into /// Aspectacular-friendly cache provider compatible with the CacheAspect. /// </summary> /// <param name="cache"></param> /// <param name="cachePolicyTemplate">.NET Framework object driving cached item expiration.</param> /// <param name="regionName"></param> /// <returns></returns> public static ObjectCacheFacade CreateCacheProvider(this ObjectCache cache, CacheItemPolicy cachePolicyTemplate, string regionName = null) { var ocp = new ObjectCacheFacade(cache, cachePolicyTemplate, regionName); return(ocp); }