We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f2f9afb + 029a85d commit 16d8ba6Copy full SHA for 16d8ba6
History.md
@@ -1,3 +1,6 @@
1
+- 1.3.0 2016-01-26
2
+ - Promise support (#39, #24) - @PuKoren
3
+
4
- 1.2.2 2015-10-19
5
- Bugfix: Fixing domain error issues when error is thrown inside 'work' function (#28).
6
README.md
@@ -138,6 +138,17 @@ memoryCache.wrap(key, function (cb) {
138
// { id: 123, name: 'Bob' }
139
```
140
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
152
Here's a very basic example of how you could use this in an Express app:
153
154
```javascript
0 commit comments