lib/CacheClient.js
function CacheClient(store, config) {
  EventEmitter.call(this);

  this._store = store;
  this._config = config || {};

  util.propagateEvent(this._store, this, 'error');
  this.on('error', unhandledErrorListener);
}
function CacheClient(store, config) {
  EventEmitter.call(this);

  this._store = store;
  this._config = config || {};

  util.propagateEvent(this._store, this, 'error');
  this.on('error', unhandledErrorListener);
}
function CacheClient ( store , config ) { EventEmitter . call ( this ) ; this . _store = store ; this . _config = config || { } ; util . propagateEvent ( this . _store , this , 'error' ) ; this . on ( 'error' , unhandledErrorListener ) ; }
Create a new cache client,
decorated with the desired features,
based on the provided config.

@constructor
@param {Store} store
@param {Object} [config]

@param {Boolean} [config.isPreconfigured] defaults to false

@param {String} [config.host] defaults to 'localhost'
@param {Number} [config.port] defaults to 6379
@param {String} [config.password]
@param {String} [config.namespace]

@param {Boolean} [config.optimizeForSmallValues] defaults to false
@param {Boolean} [config.optimizeForBuffers] defaults to false

@param {String} [config.expiresIn] in ms
@param {String} [config.staleIn] in ms

@param {Function} [config.populate]

@param {Number} [config.populateIn] in ms, defaults to 30sec
@param {Number} [config.populateInAttempts] defaults to 5
@param {Number} [config.pausePopulateIn] in ms
@param {Number} [config.leaseExpiresIn] in ms
@param {Number} [config.timeoutPopulateIn] in ms
@param {Number} [config.accessedAtThrottle] in ms
@param {Number} [config.namespace]
Create a new cache client decorated with the desired features based on the provided config .