From b9cf3bd96cb2e28d05d120bbd27ee84a99b365d9 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Wed, 22 Oct 2014 01:07:44 -0700 Subject: [PATCH] Move lru-cache over. Closes #3 --- lib/file.js | 4 ++++ package.json | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/file.js b/lib/file.js index a2e9a7b..5b276e8 100755 --- a/lib/file.js +++ b/lib/file.js @@ -6,6 +6,7 @@ var Crypto = require('crypto'); var Boom = require('boom'); var Hoek = require('hoek'); var Joi = require('joi'); +var LruCache = require('lru-cache'); var Mimos = require('mimos'); @@ -168,3 +169,6 @@ internals.openStream = function (response, path, callback) { fileStream.once('error', onError); fileStream.once('open', onOpen); }; + + +exports.Etags = LruCache; diff --git a/package.json b/package.json index 0a0a17d..e03a559 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "inert", "description": "Static file and directory handlers for hapi.js", - "version": "1.0.0", + "version": "1.1.0", "repository": "git://github.com/hapijs/inert", "main": "index", "keywords": [ @@ -18,7 +18,8 @@ "hoek": "2.x.x", "items": "1.x.x", "joi": "^4.7.x", - "mimos": "1.x.x" + "mimos": "1.x.x", + "lru-cache": "2.5.x" }, "devDependencies": { "hapi": "7.x.x",