A class fronting .NET Framework's mediocre ObjectCache with Aspectacular-friendly ICacheProvider implementation.
Inheritance: 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);
        }