Browse Source

updating example.js

feature/1.0-prep
Bryan Donovan 10 years ago
parent
commit
70522e1910
  1. 4
      examples/example.js

4
examples/example.js

@ -8,7 +8,7 @@ var ttl; //Can't use a different ttl per set() call with memory cache
// //
// Basic usage // Basic usage
// //
memoryCache.set('foo', 'bar', ttl, function(err) { memoryCache.set('foo', 'bar', function(err) {
if (err) { throw err; } if (err) { throw err; }
memoryCache.get('foo', function(err, result) { memoryCache.get('foo', function(err, result) {
@ -112,7 +112,7 @@ multiCache.wrap(key2, function(cb) {
}); });
// Sets in all caches. // Sets in all caches.
multiCache.set('foo2', 'bar2', ttl2, function(err) { multiCache.set('foo2', 'bar2', {ttl: ttl2}, function(err) {
if (err) { throw err; } if (err) { throw err; }
// Fetches from highest priority cache that has the key. // Fetches from highest priority cache that has the key.

Loading…
Cancel
Save