<commit_before>var _ = require('underscore'),
    Super = require('./memory_store');

module.exports = CollectionStore;

function CollectionStore() {
  Super.apply(this, arguments);
}

_.extend(CollectionStore.prototype, Super.prototype, {
  set: function(collection, params) {
    var key = this._getStoreKeyForCollection(collection, params);
    return Super.prototype.set.call(this, key, collection, null);
  },

  get: function(collectionName, params, callback) {
    var self = this,
      cachedCollection;

    this.mergeParams(collectionName, params, function (mergedParams) {
      var key = self._getStoreKey(collectionName, mergedParams);

        cachedCollection = Super.prototype.get.call(self, key);

      if (_.isFunction(callback)) {
        callback(cachedCollection);
      }
    });

    return cachedCollection;
  },

  clear: function(collectionName, params) {<commit_msg>added expireSeconds for the collection store<commit_after>var _ = require('underscore'),
    Super = require('./memory_store');

module.exports = CollectionStore;

function CollectionStore() {
  Super.apply(this, arguments);
}

_.extend(CollectionStore.prototype, Super.prototype, {
  expireSeconds: null,

  set: function(collection, params) {
    var key = this._getStoreKeyForCollection(collection, params);
    return Super.prototype.set.call(this, key, collection, this.expireSeconds);
  },

  get: function(collectionName, params, callback) {
    var self = this,
      cachedCollection;

    this.mergeParams(collectionName, params, function (mergedParams) {
      var key = self._getStoreKey(collectionName, mergedParams);

        cachedCollection = Super.prototype.get.call(self, key);

      if (_.isFunction(callback)) {
        callback(cachedCollection);
      }
    });

    return cachedCollection;
  },

  clear: function(collectionName, params) {
{'fraction_non_alphanumeric': 0.11888111888111888, 'fraction_numerical': 0.0, 'mean_word_length': 4.1098901098901095, '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': '3846100', 'n_tokens_mistral': 521, 'n_tokens_neox': 502, 'n_words': 109}