Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var services = new ServiceCollection();
- services.AddDistributedRedisCache(options =>
- {
- options.Configuration = "127.0.0.1";
- options.InstanceName = "master";
- });
- var provider = services.BuildServiceProvider();
- var cache = provider.GetService<IDistributedCache>();
- // Does not compile
- await cache.SetStringAsync("mykey", "myvalue");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement