<commit_before>var fs = require('fs');
var normalize = require('path').normalize;
var uglify = require('./uglify.js');

function waitStale(ttl, _t) {
  try {
    clearInterval(_t);
  } catch (e) {}
  _t = setInterval(function() { cache = {}; }, ttl * 1000);
}

var global_cache = {};

module.exports = function theRead(options) {
  // inline static has to be very fast,
  // so we just store it in the memory forever.
  var cache = {};
  var _t;

  var doCache = true;
  var processRoot = process.cwd();

  options = options || {};

  var ttl = options.ttl;
  if (ttl > 5) {
    waitStale(ttl, _t);
  } else {
    // if the ttl is less than 5 seconds,
    // we don't even cache it.
    doCache = false;
  }

  var staticRoot = options.root ? normalize(options.root) : (processRoot + '/public/');
  if (staticRoot.slice(-1) != '/') staticRoot += '/';<commit_msg>no need to read process root every time we build a read funtions<commit_after>var fs = require('fs');
var normalize = require('path').normalize;
var uglify = require('./uglify.js');

function waitStale(ttl, _t) {
  try {
    clearInterval(_t);
  } catch (e) {}
  _t = setInterval(function() { cache = {}; }, ttl * 1000);
}

var processRoot = process.cwd();

var global_cache = {};

module.exports = function theRead(options) {
  // inline static has to be very fast,
  // so we just store it in the memory forever.
  var cache = {};
  var _t;

  var doCache = true;

  options = options || {};

  var ttl = options.ttl;
  if (ttl > 5) {
    waitStale(ttl, _t);
  } else {
    // if the ttl is less than 5 seconds,
    // we don't even cache it.
    doCache = false;
  }

  var staticRoot = options.root ? normalize(options.root) : (processRoot + '/public/');
  if (staticRoot.slice(-1) != '/') staticRoot += '/';
{'fraction_non_alphanumeric': 0.1589627959413754, 'fraction_numerical': 0.007891770011273957, 'mean_word_length': 3.034090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6144839', 'n_tokens_mistral': 627, 'n_tokens_neox': 600, 'n_words': 186}