removeFromMediaCache Method

This command will remove a file from the local cache on the device.

intel.xdk.cache.removeFromMediaCache(url)

Description:

This command will remove a file from the local cache on the device. Once this command is run the “intel.xdk.cache.media.remove” event is fired.

Available Platforms:

Parameters:

  • url: The url of the file to remove from the local cache.

    Events:

  • intel.xdk.cache.media.remove: This event is fired once a cached file has been successfully removed. It will return an event object that contains the URL of the original URL of the removed file.

    Example:

    
    intel.xdk.cache.removeFromMediaCache(urlToRemove); 
    
    function cacheUpdated(e)
    {
            alert(e.url + " removed successfully");
    }
    document.addEventListener("intel.xdk.cache.media.remove", cacheUpdated, false);
    
                
    
Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.