@ryanburnette/aws-s3-json-cache
v2.0.1
Published
A JavaScript object cache on AWS S3.
Downloads
3
Readme
aws-s3-json-cache
A JavaScript object cache on AWS S3.
AWS-SDK looks for configuration on in the environment. Configure per AWS SDK documentation.
Usage
var cache = require('@ryanburnette/aws-s3-json-cache')({
bucket: 'my-bucket'
});
cache.put('obj', { foo: 'foo', bar: 'bar' }).then(function(r) {
console.log(r);
});
// => { ETag: '"baa4abdb95dba99d1946dfb15b3c1ce8"' }
cache.get('obj').then(function(obj) {
console.log(obj);
});
// => { foo: 'foo', bar: 'bar' }
cache.list().then(function(ids) {
console.log(ids);
});
// => [ 'obj' ]
Limitations
- List gets up to 1000 keys.