Skip to content
No description, website, or topics provided.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
SimpleCacheManager.UnitTests
SimpleCacheManager
.gitignore
LICENSE
README.md
SimpleCacheManager.sln

README.md

Simple Cache Manager .Net

Build status

This is a very simple cache manager example with expiration. It is a thin wrapper around a dictionary.

var cacheManager = new CacheManager<string>();

cacheManager.Add("key1", "value1", DateTime.UtcNow, TimeSpan.FromSeconds(300));
cacheManager.Add("key2", "value2", DateTime.UtcNow, TimeSpan.FromSeconds(600));

Assert.True(cacheManager.Contains("key1"));
Assert.True(cacheManager.Contains("key1"));

Assert.Equal("value1", cacheManager.GetData("key1"));
Assert.Equal("value1", cacheManager.GetData("key1"));

Enjoy

You can’t perform that action at this time.