asp.net - Disabling caching for MVC Controller Action -


i know can write custom actionfilter asp.net mvc controller action set headers in response disable caching.

my question is, there out-of-the-box actionfilter in mvc bcl this? or must have create own custom one?

you can use [outputcache] filter:

[httpget] [outputcache(location = outputcachelocation.none, nostore = true)] public actionresult index() {       // ....       return view(); } 

see msdn


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -