fixed cache on inliner when used as a module

This commit is contained in:
remy 2011-06-11 18:31:00 +01:00
parent 68a0bc8e88
commit 291182beec

View File

@ -38,6 +38,9 @@ function removeComments(element) {
function Inliner(url, options, callback) {
var root = url,
inliner = this;
this.requestCache = {};
this.requestCachePending = {};
// inherit EventEmitter so that we can send events with progress
events.EventEmitter.call(this);
@ -281,9 +284,6 @@ util.inherits(Inliner, events.EventEmitter);
Inliner.prototype.version = JSON.parse(require('fs').readFileSync(__dirname + '/package.json').toString()).version;
Inliner.prototype.requestCache = {};
Inliner.prototype.requestCachePending = {};
Inliner.prototype.get = function (url, options, callback) {
// support no options being passed in
if (typeof options == 'function') {