public IActionResult ClearDataCache(string[] cachedObjectValues, [FromServices] IBlogCache cache) { try { if (!ModelState.IsValid) { return(BadRequest(ModelState.CombineErrorMessages())); } if (cachedObjectValues.Contains("MCO_IMEM")) { cache.RemoveAllCache(); } return(Ok()); } catch (Exception e) { return(StatusCode(StatusCodes.Status500InternalServerError, e.Message)); } }