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
Post a Comment