src/caching.js
function (path, strategy) {
    if (typeof path !== 'string') {
      throw new Error('path should be a string');
    }
    if (!util.isFolder(path)) {
      throw new Error('path should be a folder');
    }
    if (this._remoteStorage && this._remoteStorage.access &&
        !this._remoteStorage.access.checkPathPermission(path, 'r')) {
      throw new Error('No access to path "'+path+'". You have to claim access to it first.');
    }
    if (!strategy.match(/^(FLUSH|SEEN|ALL)$/)) {
      throw new Error("strategy should be 'FLUSH', 'SEEN', or 'ALL'");
    }

    this._rootPaths[path] = strategy;

    if (strategy === 'ALL') {
      if (this.activateHandler) {
        this.activateHandler(path);
      } else {
        this.pendingActivations.push(path);
      }
    }
  }
function (path, strategy) {
    if (typeof path !== 'string') {
      throw new Error('path should be a string');
    }
    if (!util.isFolder(path)) {
      throw new Error('path should be a folder');
    }
    if (this._remoteStorage && this._remoteStorage.access &&
        !this._remoteStorage.access.checkPathPermission(path, 'r')) {
      throw new Error('No access to path "'+path+'". You have to claim access to it first.');
    }
    if (!strategy.match(/^(FLUSH|SEEN|ALL)$/)) {
      throw new Error("strategy should be 'FLUSH', 'SEEN', or 'ALL'");
    }

    this._rootPaths[path] = strategy;

    if (strategy === 'ALL') {
      if (this.activateHandler) {
        this.activateHandler(path);
      } else {
        this.pendingActivations.push(path);
      }
    }
  }
Configure caching for a given path explicitly.

Not needed when using ``enable``/``disable``.

@param {string} path - Path to cache
@param {string} strategy - Caching strategy. One of 'ALL', 'SEEN', or 'FLUSH'.