The sizes of the cache are stored in the LocalStorage of the browser.
The former values that were set will be used when creating a new cache / reloading the page.
The connection procedure to IndexedDB is started when the InfiniteCacheInterface is created.
/** * Sample to illustrate the use of a cache (InfiniteCacheInterface) in a DataSessionInterface. */ import { InfiniteCacheInterface, InfiniteCacheFactory, DirectorySessionInterface, DataSessionInterfaceSignal, tListenerCallback, DataSessionInterface, } from'generated_files/documentation/appinfiniteapi';
// created previously letlDirectorySession : DirectorySessionInterface; // callback called when the DMU is loaded letonDMULoaded : tListenerCallback; // the build id to connect to letlBuildId : string;
// create a data session with a cache constlDataSession : DataSessionInterface | undefined = lDirectorySession.createDataSession(lBuildId, lCache); if (lDataSession) { // be ready to do something when build is ready (i.e. all init data has been parsed and server is ready) lDataSession.addEventListener(DataSessionInterfaceSignal.DMULoadingSuccess, onDMULoaded); // and go !!! => open the data session lDataSession.openDataSession(); }
This factory is used to create the Infinite cache (InfiniteCacheInterface).
The InfiniteCacheInterface is based on IndexedDB to limit the bandwidth usage, and speed up the loading and displaying of data when using a DataSessionInterface.
The sizes of the cache are stored in the LocalStorage of the browser. The former values that were set will be used when creating a new cache / reloading the page.
The connection procedure to IndexedDB is started when the InfiniteCacheInterface is created.
Please refer to InfiniteCacheInterface for more information.
See