Beispiel #1
0
        static void Main(string[] args)
        {
            IMyCache <int, String> cache = new MyCache <int, string>(2);

            cache.Put(10, "Value1");
            cache.Put(9, "Value2");
            cache.SetIgnoreTime(DateTime.Now);
            Console.WriteLine(cache.Get(10));
            cache.Put(10, "Value3");
            cache.Put(11, "Value4");
            Console.WriteLine(cache.Get(10));
            cache.Put(12, "Value5");
            Console.WriteLine(cache.Get(10));
            cache.Put(13, "Value6");
            cache.Put(14, "Value7");
            Console.WriteLine(cache.Get(10));
            Console.ReadLine();
        }