React SPA Framework - ViewCache
include spa-deprecated-note
An application uses the viewCache object to save information on the views that were displayed so that this information is used the next time these views are displayed. This allows you to avoid gathering information on a view each time it is displayed and thus shorten the time a view display process takes. You may need to access the application's view cache. To access the application's view cache, use the viewCache field of the HtmlApplication object.
You can influence the way the application's view cache works. In addition, you can provide a custom view cache object to be used by the application. For details, refer to the description of the viewCache application configuration option.
Methods
Name | Description |
---|---|
clear() |
Removes all the viewInfo objects from the cache. |
getView(key) |
Obtains a viewInfo object from the cache by the specified key. |
hasView(key) |
Checks whether or not a viewInfo object is contained in the view cache under the specified key. |
off(eventName) |
Detaches all event handlers from a single event. |
off(eventName, eventHandler) |
Detaches a particular event handler from a single event. |
on(eventName, eventHandler) |
Subscribes to an event. |
on(events) |
Subscribes to events. |
removeView(key) |
Removes a viewInfo object from the cache by the specified key. |
setView(key, viewInfo) |
Adds the specified viewInfo object to the cache under the specified key. |
If you have technical questions, please create a support ticket in the DevExpress Support Center.