<commit_before>var SECOND = 1000;

exports.register = function (service, options, next) {

  service.method('static.getPage', require('./methods/getPage'), {
    cache: {
      staleTimeout: 1 * SECOND, // don't wait more than a second for fresh data
      staleIn: 60 * 60 * SECOND, // refresh after an hour
      segment: '##staticpage'
    }
  });

  service.method('static.getPolicy', require('./methods/getPolicy'), {
    cache: {
      staleTimeout: 1 * SECOND, // don't wait more than a second for fresh data
      staleIn: 60 * 60 * SECOND, // refresh after an hour
      segment: '##staticpolicy'
    }
  });
<commit_msg>adds 5 minute caching for static pages coming from GH<commit_after>var SECOND = 1000;
var MINUTE = 60 * SECOND;

exports.register = function (service, options, next) {

  service.method('static.getPage', require('./methods/getPage'), {
    cache: {
      expiresIn: 5 * MINUTE,
      segment: '##staticpage'
    }
  });

  service.method('static.getPolicy', require('./methods/getPolicy'), {
    cache: {
      expiresIn: 5 * MINUTE,
      segment: '##staticpolicy'
    }
  });

{'fraction_non_alphanumeric': 0.14530685920577618, 'fraction_numerical': 0.02075812274368231, 'mean_word_length': 3.0181159420289854, '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': '1274712', 'n_tokens_mistral': 370, 'n_tokens_neox': 338, 'n_words': 95}