Beispiel #1
0
        public void TestCachingPurge()
        {
            Cache cache = new NativeCache();

            cache.Add("key1", 123456);
            cache.Add("key2", 678910);

            cache.Purge();


            Assert.Catch <CacheEntryNotFoundException>(() => cache.Get <int>("key1"));
            Assert.Catch <CacheEntryNotFoundException>(() => cache.Get <int>("key2"));
        }