Created
February 5, 2015 18:59
-
-
Save devdays/35c614d14c80a606c59a to your computer and use it in GitHub Desktop.
Redis Cache from .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDatabase cache = Connection.GetDatabase(); | |
// Perform cache operations using the cache object... | |
// Simple put of integral data types into the cache | |
cache.StringSet("key1", "value"); | |
cache.StringSet("key2", 25); | |
// Simple get of data types from the cache | |
string key1 = cache.StringGet("key1"); | |
int key2 = (int)cache.StringGet("key2"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment