Example #1
0
        public async Task GetAllFromHash()
        {
            var key = "allhash";

            var cache = new SystemCache();

            cache.UpdateInHash <DummyObject>(key, "item1", new DummyObject()
            {
                Id = 1, Name = "test1"
            });

            cache.UpdateInHash <DummyObject>(key, "item2", new DummyObject()
            {
                Id = 2, Name = "test2"
            });

            var list = await cache.GetAllFromHash <DummyObject>(key);

            Assert.True(list.Count == 2);
        }