<commit_before>var EventEmitter = require('eventemitter2').EventEmitter2,
  inherits = require('util').inherits;

module.exports = Cache;

/**
 * Basic Store-backed cache
 */

function Cache(store) {
  EventEmitter.call(this, {
    wildcard: true,
    delimiter: ':'
  });
  this._store = store;
}

inherits(Cache, EventEmitter);

/**
 * Get key from cache
 *
 * @param {String} key
 * @param {Function} cb
 */

Cache.prototype.get = function (key, cb) {
  this._store.getValue(key, cb);
};

/**
 * Set a new object into the cache
 *
 * @param {String} key
 * @param {Object} value
 * @param {Function} cb
 */

Cache.prototype.set = function (key, value, cb) {
  this._store.setValue(key, value, cb);
};

/**
 * Remove key from cache
 *
 * @param {String} key
 * @param {Function} cb
 */

Cache.prototype.del = function (key, cb) {
  this._store.del(key, cb);
};

/**
 * Get primary store
 *
 * @protected
 * @returns {Store}
 */

Cache.prototype._getStore = function () {
  return this._store;
};
<commit_msg>Cache: use EventEmitter2 for perf only<commit_after>var EventEmitter = require('eventemitter2').EventEmitter2,
  inherits = require('util').inherits;

module.exports = Cache;

/**
 * Basic Store-backed cache
 */

function Cache(store) {
  EventEmitter.call(this);
  this._store = store;
}

inherits(Cache, EventEmitter);

/**
 * Get key from cache
 *
 * @param {String} key
 * @param {Function} cb
 */

Cache.prototype.get = function (key, cb) {
  this._store.getValue(key, cb);
};

/**
 * Set a new object into the cache
 *
 * @param {String} key
 * @param {Object} value
 * @param {Function} cb
 */

Cache.prototype.set = function (key, value, cb) {
  this._store.setValue(key, value, cb);
};

/**
 * Remove key from cache
 *
 * @param {String} key
 * @param {Function} cb
 */

Cache.prototype.del = function (key, cb) {
  this._store.del(key, cb);
};

/**
 * Get primary store
 *
 * @protected
 * @returns {Store}
 */

Cache.prototype._getStore = function () {
  return this._store;
};

{'fraction_non_alphanumeric': 0.1660830415207604, 'fraction_numerical': 0.0025012506253126563, 'mean_word_length': 3.524886877828054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2071093', 'n_tokens_mistral': 681, 'n_tokens_neox': 687, 'n_words': 174}