diff --git a/cache.js b/cache.js index 82e9152..000fe63 100644 --- a/cache.js +++ b/cache.js @@ -12,7 +12,7 @@ exports.set = function(key, value, expire = '5 minutes') { exports.read = exports.get = function(key, def) { var item = F.temporary.cache[key]; global.NOW = new Date(); - if (item && item.expire < global.NOW) + if (item && item.expire > global.NOW) return item.value; else return def; diff --git a/changelog.txt b/changelog.txt index b0229d6..8d00c52 100644 --- a/changelog.txt +++ b/changelog.txt @@ -16,6 +16,7 @@ - added `action.status(fn)` for handling and `$.status(value)` for calling in actions - added HTTP auto-redirect for `WebSocketClient` - added support for WebSocket redirections in the remote edit +- fixed `CACHE.read()` ======================== 0.0.5