A class fronting .NET Framework's mediocre ObjectCache with Aspectacular-friendly ICacheProvider implementation.
상속: ICacheProvider2
예제 #1
0
 /// <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;
 }
예제 #2
0
        /// <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);
        }