예제 #1
0
        public void InvalidateCache()
        {
            var cache = new SimpleCache <Guid, string>(_expirationSpan, CacheExpirationTypes.Timed);

            cache.AddItem(new CacheItem <Guid, string> {
                Key = Guid.Empty, Value = string.Empty
            });

            var cachedCount = cache.Count();

            cache.InvalidateCache();

            Assert.AreNotEqual(cachedCount, cache.Count());
        }