ES5 class to handle analytics fetching and caching
First of all, why restrict to ES5? Unless you're running/targetting Node &lt; 4 (which is a security hazard, a story for another time), just write using the syntax available to the Node version you're running. Restricting your syntax is unnecessary overhead.

Now you don't need to go OOP on this one. I find that once people resort to OOP, the code usually ends up very boilerplate-y, contains lots of indirection, you worry about what this is. You can simply have a global cache keyed by file name and holds the data and expiry. Keep it simple.

data = data.trim().split('\n').map(function(entry) {
  entry = JSON.parse(entry);
  entry.country = geoip.lookup(entry.ip).name;
  return entry;
});


Why are you storing multiple JSON data inside one file separated by newline? The split by \n can be brittle. If it happens that your writer newlines the data in the middle, this will blow up. If you want to keep this data together, consider writing them in a stringified array instead. Stringified arrays are perfectly valid JSON.

Use promises. Callbacks are so 2 years ago, and are very clunky. There's a module called fs-extra that promisifies fs operations.

And Date.now() is available since ES5 to get the current millisecond timestamp.

const fs = require('fs-extra')
const geoip = require('geoip-native')
const cacheKeepTime = 3600000
const cache = {}

exports.getAnalytics = function(path){
  const currentTime = Date.now()
  const cacheHit = cache[path] &amp;&amp; cache[path].data &amp;&amp; cache[path].expiry &lt; currentTime

  return cacheHit ? Promise.resolve(cache[path].data) : fs.readFile(path, 'utf8').then(contents =&gt; {
    const data = JSON.parse(contents) // Error in a callback rejects the promise
    const expiry = currentTime  + cacheKeepTime

    // Update cache
    cache[path] = { data, expiry }

    return data
  })
}

// Usage
const analytics = require('./analytics')
const someAnalyticsFile = 'path/to/analytics.json'

analytics.getAnalytics(someAnalyticsFile).then(data =&gt; {
  // We got data
}, error =&gt; {
  // Something blew up
})