@ryanburnette/aws-s3-json-cache

2.0.1 • Public • Published

aws-s3-json-cache

repo npm

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @ryanburnette/aws-s3-json-cache

Weekly Downloads

5

Version

2.0.1

License

ISC

Unpacked Size

3.05 kB

Total Files

5

Last publish

Collaborators

  • ryanburnette