public void ItemShouldBeRemovedAfterTtl() { var d = new TtlDictionary <int, string>(); d.Set(10, "Hello world!", new TimeSpan(0, 0, 2)); Thread.Sleep(1000); d.Should().ContainKey(10); Thread.Sleep(2000); d.Count.Should().Be(0); }
public static void Clear() { cookiestore = new TtlDictionary<string, Cookie>(); }