{"id":19151449,"url":"https://github.com/sc5/aws-document-cache","last_synced_at":"2026-06-20T11:32:32.849Z","repository":{"id":35181822,"uuid":"39439478","full_name":"SC5/aws-document-cache","owner":"SC5","description":"Generic document cache based on DynamoDB","archived":false,"fork":false,"pushed_at":"2016-02-03T19:47:41.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-02T09:15:08.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SC5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-21T10:35:39.000Z","updated_at":"2016-02-03T19:47:41.000Z","dependencies_parsed_at":"2022-09-02T05:41:28.915Z","dependency_job_id":null,"html_url":"https://github.com/SC5/aws-document-cache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Faws-document-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Faws-document-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Faws-document-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Faws-document-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SC5","download_url":"https://codeload.github.com/SC5/aws-document-cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240236233,"owners_count":19769573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T08:14:44.839Z","updated_at":"2026-06-14T11:30:16.414Z","avatar_url":"https://github.com/SC5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-document-cache NPM module\n\nA module for implementing a simple in-memory and DB cache for 3rd party datasources using AWS DynamoDB\n\n## Prerequisites\n\nA DynamoDB table with a primary key \"cacheKey\" of type \"String\"\nAWS credentials as required by aws-sdk module (e.g. ~/.aws/credentials)\n\n## Use example\n\n\n    var cache = require(\"aws-document-cache\");\n    cache.init({\n                'awsRegion' : 'eu-west-1',             # Region where the table resides\n                'cacheTable' : 'myDynamoDBTable',      # Table for the cache\n                'memCacheLifetime' : 3600 * 1000,      # Lifespan in ms for the memory cache entries\n                'dbCacheLifetime' : 24 * 3600 * 1000,  # Lifespan in ms for the db cache entries\n                });\n                \n    cache.getDoc('myObjType', 'myObjId', function(err,data) {\n        if (err) {\n            ...\n        }\n        if (data == null) {\n            ... was not found in cache, load it\n        }\n    });\n\n    cache.setDoc('myObjType', 'myObjId', data, function(err, data) {\n        if (err) {\n            ... storage failed\n        }\n        ...\n    }\n\n    \n\n\n## Release History\n\n* 2015/07/21 - v0.0.1 - Initial version of module\n* 2015/07/22 - v0.0.2 - BUGFIX: old references to promise style callbacks removed\n* 2015/07/22 - v0.0.3 - BUGFIX: old references to promise style callbacks removed\n* 2015/12/28 - v0.0.5 - Cleaned temp files generated by emacs. Changed dynamodb-doc -\u003e aws-sdk. \n* 2016/02/03 - v0.0.6 - Fix memCacheLifetime parameter\n\n## License\n\nCopyright (c) 2015 [SC5](http://sc5.io/), licensed for users and contributors under MIT license.\nhttps://github.com/SC5/aws-document-cache/blob/master/LICENSE\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/SC5/aws-document-cache/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc5%2Faws-document-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsc5%2Faws-document-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc5%2Faws-document-cache/lists"}