Skip to content

Instantly share code, notes, and snippets.

@davejohnson
Created September 3, 2010 22:31
Show Gist options
  • Save davejohnson/564667 to your computer and use it in GitHub Desktop.
Save davejohnson/564667 to your computer and use it in GitHub Desktop.
function Cache() { }
Cache.prototype.getCachedPathForURI = function(uri, success, fail) {
return PhoneGap.execAsync(function(args) {
success(uri, args.file);
}, function(args) {
fail(uri, args.message);
}, 'com.example.URLCache', 'getCachedPathForURI', [uri, 'FOO']);
};
PhoneGap.addPlugin('urlCache', new Cache());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment