koa-incache
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -7,2 +7,5 @@ # Change Log | ||
## [0.4.0] - 2019-01-02 | ||
- Added cache options to `cached` method | ||
## [0.3.2] - 2018-10-16 | ||
@@ -9,0 +12,0 @@ - Fixed the global maxAge param was not considered |
@@ -54,6 +54,7 @@ const InCache = require('./override/incache'); | ||
* @param value {any} any value to caching | ||
* @param [opts] {object} InCache options | ||
* @returns {{isNew: boolean, createdOn: (Date|null), updatedOn: (Date|null), value: *}} | ||
*/ | ||
ctx.cached = (value) => { | ||
return ctx.cache.set(key, value); | ||
ctx.cached = (value, opts) => { | ||
return ctx.cache.set(key, value, opts); | ||
}; | ||
@@ -60,0 +61,0 @@ |
{ | ||
"name": "koa-incache", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Koa cache middleware", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
118