Note: Building method caching key is very expensive performance-wise. Use it only to cache data that store in slow storage types, like databases, files, on the network, on the Internet, etc.
Please note that CacheAspect will not attempt to invalidate the cache - it's a responsibility of the ICacheProvider implementation.
Inheritance: Aspect
Beispiel #1
0
        public static CacheAspect CreateCacheAspect(this ICacheProvider cacheProvider)
        {
            if (cacheProvider == null)
            {
                throw new ArgumentNullException("cacheProvider");
            }

            var cacheAspect = new CacheAspect(cacheProvider);

            return(cacheAspect);
        }
Beispiel #2
0
        public static CacheAspect CreateCacheAspect(this ICacheProvider cacheProvider)
        {
            if (cacheProvider == null)
                throw new ArgumentNullException("cacheProvider");

            var cacheAspect = new CacheAspect(cacheProvider);
            return cacheAspect;
        }