File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change
1
+ - 2.3.0 2016-12-22
2
+ - Updating isCacheableValue description in README; README syntax error fix (#70 , #71 ) - @lukechilds
3
+ - Calling back with null as first argument in memory store to keep style consistent (#72 ) - @defcc
4
+
1
5
- 2.2.0 2016-10-19
2
6
- Adding multi_caching.reset() (#63 ) - @disjunction
3
7
Original file line number Diff line number Diff line change @@ -250,13 +250,15 @@ multiCache.wrap(key2, function (cb) {
250
250
});
251
251
```
252
252
253
- ### Specifying What to Cache
253
+ ### Specifying What to Cache in ` wrap ` Function
254
254
255
255
Both the ` caching ` and ` multicaching ` modules allow you to pass in a callback function named
256
- ` isCacheableValue ` which is called with every value returned from cache or from a wrapped function.
257
- This lets you specify which values should and should not be cached. If the function returns true, it will be
256
+ ` isCacheableValue ` which is called by the ` wrap ` function with every value returned from cache or from the wrapped function.
257
+ This lets you specify which values should and should not be cached by ` wrap ` . If the function returns true, it will be
258
258
stored in cache. By default the caches cache everything except ` undefined ` .
259
259
260
+ NOTE: The ` set ` functions in ` caching ` and ` multicaching ` do * not* use ` isCacheableValue ` .
261
+
260
262
For example, if you don't want to cache ` false ` and ` null ` , you can pass in a function like this:
261
263
262
264
``` javascript
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " cache-manager" ,
3
- "version" : " 2.2 .0" ,
3
+ "version" : " 2.3 .0" ,
4
4
"description" : " Cache module for Node.js" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments