Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.63 KB

page_navigationcachemode.md

File metadata and controls

37 lines (24 loc) · 1.63 KB
-api-id -api-type
P:Windows.UI.Xaml.Controls.Page.NavigationCacheMode
winrt property

Windows.UI.Xaml.Controls.Page.NavigationCacheMode

-description

Gets or sets the navigation mode that indicates whether this Page is cached, and the period of time that the cache entry should persist.

-xaml-syntax

<page NavigationCacheMode="navigationCacheModeMemberName" />

-property-value

A value of the enumeration. The default is Disabled.

-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.

-examples

For example code that uses NavigationCacheMode, see Navigation.

-see-also

Frame, Frame.CacheSize, NavigationCacheMode, Navigation