Caching in ASP.NET 5 in Controller
<p>I am trying to cache a output controller like I did in ASP.NET MVC 5.</p>

<p>I did that in ASP.NET MVC 5 Controller:</p>

<pre><code> [OutputCache(Duration = 60, VaryByParam = "*", Location = OutputCacheLocation.ServerAndClient)]
</code></pre>

<p>Now, I'm trying that in ASP.NET 5 MVC 6:</p>

<p>Controller Attribute:</p>

<pre><code>[ResponseCache(CacheProfileName = "TestCache")]
</code></pre>

<p>In my <strong>Startup.cs</strong>:</p>

<pre><code>//Caching
            services.Configure&lt;MvcOptions&gt;(options =&gt; options.CacheProfiles.Add("TestCache", new CacheProfile()
            {
                Duration = 3600,
                Location = ResponseCacheLocation.Any,
                VaryByHeader = "*"
            }));
</code></pre>

<p>I have added a breakpoint in my TestController, but the breakboint is fired everytime.</p>

<p>How can I fix it?</p>