'Preloading the Oracle Jet Offline Persistence Toolkit cache

What is the best way to 'preload' my data model for the Oracle Jet (OJET) Offline Persistence Toolkit (OPT)?

I know certain frequently used resources and queries that will be required when offline. Also, a user while online can select specific 'projects' they want to be preloaded for offline work.

Is the best way to do this with OPT to write JavaScript that identifies and calls all the necessary REST Get operations for all the necessary individual resources and required queries thus prepopulating the offline cache?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source