public APIResultModel SetCache([FromBody] CacheViewModel cache) { ICacheBusiness cacheBusiness = CacheFactory.Instance("redis"); var cacheResult = cacheBusiness.SetValue(cache.Key, cache.Value.ToString()); APIResultModel result = new APIResultModel() { Success = cacheResult.Success, Message = cacheResult.Message }; return(result); }
public CacheController(ICacheBusiness cacheBusiness) { _cacheBusiness = cacheBusiness; }