Skip to content

Commit 16d8ba6

Browse files
committed
Merge branch 'release/1.3.0' into develop
2 parents f2f9afb + 029a85d commit 16d8ba6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

History.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- 1.3.0 2016-01-26
2+
- Promise support (#39, #24) - @PuKoren
3+
14
- 1.2.2 2015-10-19
25
- Bugfix: Fixing domain error issues when error is thrown inside 'work' function (#28).
36

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ memoryCache.wrap(key, function (cb) {
138138
// { id: 123, name: 'Bob' }
139139
```
140140

141+
#### Example Using Promises
142+
143+
```javascript
144+
memoryCache.wrap(key, function() {
145+
return getUserPromise(userId);
146+
});
147+
then(function(user) {
148+
console.log('User:', user);
149+
});
150+
```
151+
141152
Here's a very basic example of how you could use this in an Express app:
142153

143154
```javascript

0 commit comments

Comments
 (0)