Skip to content

Commit fdb929a

Browse files
committed
Merge branch 'release/2.3.0'
2 parents b82b523 + 62fc5bf commit fdb929a

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

History.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
- 2.2.0 2016-10-19
26
- Adding multi_caching.reset() (#63) - @disjunction
37

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,15 @@ multiCache.wrap(key2, function (cb) {
250250
});
251251
```
252252

253-
### Specifying What to Cache
253+
### Specifying What to Cache in `wrap` Function
254254

255255
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
258258
stored in cache. By default the caches cache everything except `undefined`.
259259

260+
NOTE: The `set` functions in `caching` and `multicaching` do *not* use `isCacheableValue`.
261+
260262
For example, if you don't want to cache `false` and `null`, you can pass in a function like this:
261263

262264
```javascript

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cache-manager",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "Cache module for Node.js",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)