asp.net mvc - MVC Global Server Side Output Caching -


i'm trying setup global server side output caching our public site. can see there outputcache attribute lets control this. works fine if register globally in filterconfig this

filters.add(new outputcacheattribute() { duration = 3600, varybyparam = "*" }); 

the problem enables caching on client side , causing issue redirect logic have setup. need

but if set location property server this

filters.add(new outputcacheattribute() { duration = 3600, varybyparam = "*", location = outputcachelocation.server }); 

then causes following exception on pages child actions.

outputcacheattribute child actions supports duration, varybycustom, , varybyparam values. please not set cacheprofile, location, nostore, sqldependency, varybycontentencoding, or varybyheader values child actions

is there way enable server side caching globally? can explain why not work?

that limitation in mvc. can use custom output caching. follow link

you can install mvcdonutcaching using nuget

and replace outputcache... donutoutputcache...


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -