c# - ResponseCache attribute not working in some cases in vNext -


i'm using responsecache attribute in 1 simple controller:

[responsecache(duration = 60)] public iactionresult test() {    return view(); } 

but, in response headers, i'm getting cache-control no-cache:

enter image description here

i have tested same code in other controller this, , it's working fine...

[httpget] [route("getmydtocached")] [responsecache(duration= 86400)] public async task<mydto> getmydtocached(string id) {     return await _service.getmydtobyid(id); } 

enter image description here

any ideas?

thanks!


Comments