Skip to content

Instantly share code, notes, and snippets.

@codeactual
Created October 22, 2011 00:37
Show Gist options
  • Save codeactual/1305359 to your computer and use it in GitHub Desktop.
Save codeactual/1305359 to your computer and use it in GitHub Desktop.
var cache = new clientsiiide('MyFeedWidget');
// Asynchronous with read-through.
cache.get({
ns: 'tags',
keys: ['key1', 'key2'],
expires: 3600,
onDone: function(results) {
// Process key/value pairs in "results".
},
onMiss: function(keys, onMissDone) {
var values = {};
// Populate "values" from data store.
return valueKeyValuePairs;
}
});
// Synchronous version.
cache.syncGet({
ns: 'tags',
keys: ['key1', 'key2'],
expires: 3600
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment