For persistent caching of data between application sessions.
This object is intended to provide local storage for data to speed up applications. It can be used as in conjunction with, or as an alternative to the HTML5 local database. Its methods provide features similar to browser cookies and file caching.
For cookies, the intention is that you would use setCookie to save string data in name-value pairs. Cookies persist between application sessions. Data values may be retrieved using the getCookie command or from the getCookieList command as soon as the "intel.xdk.device.ready" event is fired. The media cache commands are meant to provide quicker access to files such as videos and images. Adding files to the media cache will expedite access to them when the application runs. These are files that are cached across sessions and are not in your application bundle. See the section on events below for more information about events fired from the cache section of intel.xdk.Object | Type | Notes |
---|---|---|
intel.xdk.cache.addToMediaCache | method | This command will get a file from the Internet and cache it locally on the device. |
intel.xdk.cache.addToMediaCacheExt | method | This command will get a file from the Internet and cache it locally on the device. More details |
intel.xdk.cache.clearAllCookies | method | This method will clear all data stored using the setCookie method. More details |
intel.xdk.cache.clearMediaCache | method | This command will remove all files from the local cache on the device. |
intel.xdk.cache.getCookie | method | This method will retrieve the value of a cookie previously saved using the setCookie command. |
intel.xdk.cache.getCookieList | method | This method will return an array containing the names of all the previously saved cookies using the setCookie command. |
intel.xdk.cache.getMediaCacheList | method | This method will get an array containing all the names of all the previously cached files. |
intel.xdk.cache.getMediaCacheLocalURL | method | This method will return an url that you can use to access a cached media file. |
intel.xdk.cache.getMediaCacheRelativePath | method | undocumented |
intel.xdk.cache.removeCookie | method | This method will clear data previously saved using the setCookie method. |
intel.xdk.cache.removeFromMediaCache | method | This command will remove a file from the local cache on the device. |
intel.xdk.cache.setCookie | method | Call this method to set a chunk of data that will persist from session to session. |
intel.xdk.cache.media.add | event | Fires when data is cached |
intel.xdk.cache.media.clear | event | Fired once all files are removed from the local file cache |
intel.xdk.cache.media.remove | event | Fired when data is removed from the cache |
intel.xdk.cache.media.update | event | Fired repeatedly to track caching progress |
Supplemental Documentation
This object is intended to provide local storage for data to speed up applications. It can be used as in conjunction with, or as an alternative to the HTML5 local database. Its methods provide features similar to browser cookies and file caching.
This object is intended to provide local storage for data to speed up applications. It can be used as in conjunction with, or as an alternative to the HTML5 local database. Its methods provide features similar to browser cookies and file caching.
LoginThis is space for login message