Add missing hasNew.

This commit is contained in:
André Cruz
2013-04-14 17:25:36 +01:00
parent 85d2a33620
commit f33bac5b59
3 changed files with 18 additions and 0 deletions

View File

@@ -45,6 +45,10 @@ Resolver.prototype.resolve = function () {
.then(this._parseJson.bind(this));
};
Resolver.prototype.hasNew = function (oldResolution) {
return Q.resolve(true);
};
Resolver.prototype.isCacheable = function () {
return false;
};

View File

@@ -10,11 +10,18 @@ util.inherits(FsResolver, Resolver);
// -----------------
FsResolver.prototype.hasNew = function (oldResolution) {
// TODO: should we store latest modified files in the resolution and compare?
return Q.resolve(true);
};
FsResolver.prototype._resolveSelf = function () {
return this._copy()
.then(this._extract.bind(this));
};
// -----------------
FsResolver.prototype._copy = function () {
};

View File

@@ -10,11 +10,18 @@ util.inherits(UrlResolver, Resolver);
// -----------------
UrlResolver.prototype.hasNew = function (oldResolution) {
// Store cache expiration headers in the resolution and compare them afterwards
Q.resolve(true);
};
UrlResolver.prototype._resolveSelf = function () {
return this._download()
.then(this._extract.bind(this));
};
// -----------------
UrlResolver.prototype._download = function () {
};