public ActionResult InvalidateCache([FromBody] InvalidateCache invalidateCache, [FromServices] ICustomMemoryCache customMemoryCache) { customMemoryCache.Invalidate(invalidateCache.Prefix); return(RedirectToAction(nameof(Index))); }
public ActionResult InvalidateCache([FromServices] ICustomMemoryCache customMemoryCache) { customMemoryCache.Invalidate(Request.Query["prefix"]); return(RedirectToAction(nameof(Index))); }