static void Main(string[] args) { ICacheStorage cacheStorage = new HttpContextCache(); cacheStorage.Store("abc", "abc", new TimeSpan(0, 1, 0)); Console.ReadKey(); }
public void StoreTest() { const string expectedKey = "test2"; const string expectedValue = "test2"; GenerateFakeHttpContext(); var cache = new HttpContextCache(); cache.Store(expectedKey, expectedValue); var retrieved = cache.Retrieve <string>(expectedKey); Assert.AreEqual(expectedValue, retrieved); }