Property CanBeCached
CanBeCached
Gets a value indicating whether the view model and its associated view can be cached in the navigation stacks.
Declaration
bool CanBeCached { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
If a view model (or its associated view) consumes a large amount of memory or should be recreated whenever it is navigated to, this property should return false to avoid being cached when it is inactive. If a parent view model that provided services to a child view model is evicted from cache then all of its children are also evicted.
Use ConfigureNavigationStacks(int, int, int) to control the maximum depth of cached views and view models.