Skip to content

Commit

Permalink
Allow node v0.6.x and 0.8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed Jul 5, 2012
1 parent 02ce537 commit c01aaee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node/utils/caching_middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ var path = require('path');
var zlib = require('zlib');
var util = require('util');
var settings = require('./Settings');
var semver = require('semver');

var existsSync = (semver.satisfies(process.version, '>=0.8.0')) ? fs.existsSync : path.existsSync

var CACHE_DIR = path.normalize(path.join(settings.root, 'var/'));
CACHE_DIR = fs.existsSync(CACHE_DIR) ? CACHE_DIR : undefined;
CACHE_DIR = existsSync(CACHE_DIR) ? CACHE_DIR : undefined;

var responseCache = {};

Expand Down

0 comments on commit c01aaee

Please sign in to comment.