code: function FileCache(options){
    var self = this;
    // cordova-promise-fs
    this._fs = options.fs;
    if(!this._fs) {
      throw new Error('Missing required option "fs". Add an instance of cordova-promise-fs.');
    }
    // Use Promises from fs.
    Promise = this._fs.Promise;
  
    // 'mirror' mirrors files structure from "serverRoot" to "localRoot"
    // 'hash' creates a 1-deep filestructure, where the filenames are hashed server urls (with extension)
    this._mirrorMode = options.mode !== 'hash';
    this._retry = options.retry || [500,1500,8000];
    this._cacheBuster = !!options.cacheBuster;
  
    // normalize path
    this.localRoot = this._fs.normalize(options.localRoot || 'data');
    this.serverRoot = this._fs.normalize(options.serverRoot || '');
  
    // set internal variables
    this._downloading = [];    // download promises
    this._added = [];          // added files
    this._cached = {};         // cached files
  
    // list existing cache contents
    this.ready = this._fs.ensure(this.localRoot)
    .then(function(entry){
      self.localInternalURL = typeof entry.toInternalURL === 'function'? entry.toInternalURL(): entry.toURL();
      self.localUrl = entry.toURL();
      return self.list();
    });
  }
docs: /* Cordova File Cache x