<commit_before>/**
 * Super-Cache
 *
 * @author <NAME> <<EMAIL>>
 */

var redis = require('redis');
var debug = require('../debug')('RedisStore');


/**
 * RedisStore
 *
 * @param {Object} options
 *   - {String} host
 *   - {String} port
 *   - {String} prefix
 */
function RedisStore (options) {
  options = options || {};
  this._host = options.host || '127.0.0.1';
  this._port = options.port || 11211;
  this._db = options.db || 0;
  this._prefix = options.prefix || '';

  debug('create: host=%s, port=%s, db=%s, prefix=%s', this._host, this._port, this._db, this._prefix);

  this._client = redis.createClient({
    host: this._host,
    port: this._port
  });
  this._client.select(this._db);
}

RedisStore.prototype._getKey = function (name) {<commit_msg>修正 RedisStore 连接配置问题<commit_after>/**
 * Super-Cache
 *
 * @author <NAME> <<EMAIL>>
 */

var redis = require('redis');
var debug = require('../debug')('RedisStore');


/**
 * RedisStore
 *
 * @param {Object} options
 *   - {String} host
 *   - {String} port
 *   - {String} prefix
 */
function RedisStore (options) {
  options = options || {};
  this._host = options.host || '127.0.0.1';
  this._port = options.port || 6379;
  this._db = options.db || 0;
  this._prefix = options.prefix || '';

  debug('create: host=%s, port=%s, db=%s, prefix=%s', this._host, this._port, this._db, this._prefix);

  this._client = redis.createClient(this._port, this._host, options);
  this._client.select(this._db);
}

RedisStore.prototype._getKey = function (name) {
{'fraction_non_alphanumeric': 0.1984179301252472, 'fraction_numerical': 0.015161502966381015, 'mean_word_length': 3.4911242603550297, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3903673', 'n_tokens_mistral': 555, 'n_tokens_neox': 540, 'n_words': 112}