public void ClearBuildsCache()
        {
            CachingLifetimeManager cachingLifetimeManager = Container.Resolve <CachingLifetimeManager>();
            CachingCallHandler     cache = cachingLifetimeManager.GetCachingCallHandler();

            cache.ClearBuildsCache();
        }
Exemplo n.º 2
0
 public void AddAopHandler(MethodBase methodBase, IList methodHandlers)
 {
     if (usageAttribute)
     {
         AddAopHandlerByUsageAttribute(methodBase, methodHandlers);
     }
     else
     {
         var handler = new CachingCallHandler(new CachingData(maxResultCaching, lifetimeType, lifetimeMethod));
         methodHandlers.Add(handler);
     }
 }
Exemplo n.º 3
0
        public void ShouldBeAbleToSetCacheExpiration()
        {
            CachingCallHandler handler = new CachingCallHandler(new TimeSpan(1, 0, 0));

            Assert.AreEqual(new TimeSpan(1, 0, 0), handler.ExpirationTime);
        }
Exemplo n.º 4
0
        public void ShouldDefaultToFiveMinuteCacheExpiration()
        {
            CachingCallHandler handler = new CachingCallHandler();

            Assert.AreEqual(new TimeSpan(0, 5, 0), handler.ExpirationTime);
        }