Last active
July 14, 2021 16:07
-
-
Save ealsur/88521c2dc139f391f2786ff40e985565 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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