<commit_before>var redis = require('redis');
var Promise = require('bluebird');

function RedisStore(options) {
  if (!(this instanceof RedisStore)) return new RedisStore(options);
  options = options || {};
  this.client = null;
  this.prefix = options.prefix || 'middleman:';
  this.expire = null;
  this._expirationPolicy = false;

  if (options.url) {
    options.socket = options.url;
  }
  if (options.expire) {
    options.ttl = options.expire;
  }

  if (options.client) {
    this.client = options.client;
  } else if (options.socket) {
    this.client = redis.createClient(options.socket, options);
  } else {
    this.client = redis.createClient(options);
  }

  if (options.pass) {
    this.client.auth(options.pass, function(err) {
      if (err) {
        throw err;
      }
    });
  }

  if (typeof options.db !== 'undefined') {
    this.client.select(options.db);<commit_msg>options.expire => options.maxAge<commit_after>var redis = require('redis');
var Promise = require('bluebird');

function RedisStore(options) {
  if (!(this instanceof RedisStore)) return new RedisStore(options);
  options = options || {};
  this.client = null;
  this.prefix = options.prefix || 'middleman:';
  this.expire = null;
  this._expirationPolicy = false;

  if (options.url) {
    options.socket = options.url;
  }
  if (options.maxAge) {
    options.ttl = options.maxAge;
  }

  if (options.client) {
    this.client = options.client;
  } else if (options.socket) {
    this.client = redis.createClient(options.socket, options);
  } else {
    this.client = redis.createClient(options);
  }

  if (options.pass) {
    this.client.auth(options.pass, function(err) {
      if (err) {
        throw err;
      }
    });
  }

  if (typeof options.db !== 'undefined') {
    this.client.select(options.db);
{'fraction_non_alphanumeric': 0.15085967831392125, 'fraction_numerical': 0.0, 'mean_word_length': 3.2051282051282053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7511768', 'n_tokens_mistral': 604, 'n_tokens_neox': 592, 'n_words': 120}