'use strict';

var consts = require('./consts');

/**
 * 设置缓存数据
 * @param {string} key
 * @param {any} value
 * @returns
 */
function setCache(key, value) {
  var caches = window[consts.BUTILS_CACHE] || {};
  window[consts.BUTILS_CACHE] = caches;
  caches[key] = value;
}

module.exports = setCache;
