How to save redis in a specific file at asp.net core -
i using "microsoft.extensions.caching.redis.core": "1.0.3", in statup.cs write follow code `
public void configureservices(iservicecollection services){ services.adddistributedrediscache(options => { options.instancename = "sample"; options.configuration ="11.11.22.24:6379,password=*****"; }); } `
, in controller.cs write follow code
_distributedcache.setstring("hellofromredis", "world"); var valuefromredis = _distributedcache.getstring("hellofromredis"); on redis server data this how save data in db1
Comments
Post a Comment