Page.NavigationCacheMode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
property NavigationCacheMode NavigationCacheMode { NavigationCacheMode get(); void set(NavigationCacheMode value); };
NavigationCacheMode NavigationCacheMode();
void NavigationCacheMode(NavigationCacheMode value);
public NavigationCacheMode NavigationCacheMode { get; set; }
var navigationCacheMode = page.navigationCacheMode;
page.navigationCacheMode = navigationCacheMode;
Public Property NavigationCacheMode As NavigationCacheMode
<page NavigationCacheMode="navigationCacheModeMemberName" />
Property Value
A value of the enumeration. The default is Disabled.
Examples
For example code that uses NavigationCacheMode, see Navigation.
Remarks
To enable a page to be cached, set NavigationCacheMode to either Enabled or Required. The difference in behavior is that Enabled might not be cached if the frame's cache size limit (CacheSize) is exceeded, whereas Required always generates an entry no matter the size limit.
If you want to change the value of NavigationCacheMode programmatically to Enabled or Required, you can only set these values in the constructor for the page.
If you change the value of NavigationCacheMode from Required or Enabled to Disabled, the page is flushed from the cache. The page is not simply marked as available to be flushed when the configured CacheSize is exceeded.