Page in preview mode is cached if route has cachin...
# help-with-umbraco
s
I have a BaseRenderController where I have added response caching:
Copy code
[AcceptVerbs("GET", "POST")]
[ResponseCache(CacheProfileName = "Primary", VaryByQueryKeys = new string[] { })]
public override IActionResult Index()
{
    return this.RenderDefaultView();
}
Whenever I preview from the backoffice, I will see the cached version. I have come across an issue (https://github.com/umbraco/Umbraco-CMS/issues/10989) on the issue tracker, but the solution is for Umbraco 8 and I have no idea on how to rewrite so it works for Umbraco 10 - If it is possible. Ideally I just want to bypass the ResponseCache whenever I preview. Do you have any examples / ideas on how to solve it? Or do I need to rethink my approach?