Configure the OutputCache at runtime
hello!
i have used outputcache attribute enable iis caching of domain service queries -- cool!
now, i'd make caching timeouts configurable, don't have release new build change cache policy service.
is there built-in way drive web.config file?
or
is there way set output cache imperatively code (not declaratively attribute)?
thanks -- ended finding answer -- post else:
you can pass string outputcache attribute specifies cache profile:
[outputcache("profilename")]
then, in web.config, add following:
(add inside of <system.web> node <caching> <outputcachesettings> <outputcacheprofiles> <add name="profilename" duration="60" location="server"/> </outputcacheprofiles> </outputcachesettings> </caching>
only thing watch out -- if specify named profile in attribute declaration, , leave out web.config, yo uwill runtime exception.
Silverlight > WCF RIA Services with Silverlight
Comments
Post a Comment