Limit View State Caching
NCache provides flexibility to limit the number of view states per group and per session and allows locking the view state metadata. To limit View State, make the following changes in <ncContentOptimization>
tag:
<ncContentOptimization>
<settings enableViewstateCaching="true"
viewstateThreshold="0"
cacheUriMapping="true"
enableTrace="true"
groupedViewStateWithSessions="true"
maxViewStatesPerSession="5"
enableMetadataLocking="false"
releaseLockInterval="5000">
<cacheSettings cacheName="mycache">
<expiration type="None" duration="0" >
</cacheSettings>
</settings>
</ncContentOptimization>
Configuration Members
Members | Description |
---|---|
MaxViewStatesPerSession |
To enable this feature, specify any value greater than zero, if zero or lesser value is configured all View State will be cached. If a tag is skipped, all View State will be cached. |
EnableMetadataLocking |
Defines whether internal metadata manipulation is a locking operation or not. Its default value is true. It comes into play if MaxViewStatesPerSession is enabled. |
ReleaseLockInterval |
Defines interval after which lock is released. Its value is in milliseconds. Its default value is 5000ms. It comes into play if MaxViewStatesPerSession is enabled. |