Skip to content

Instantly share code, notes, and snippets.

Last active Jul 14, 2021
What would you like to do?
public class MyBusinessClass
private readonly IDistributedCache cache;
public MyBusinessClass(IDistributedCache cache)
this.cache = cache;
public async Task SomeOperationAsync()
string someCachedValue = await this.cache.GetStringAsync("someKey");
/* Use the cache */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment