
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
catbox-dynamodb
Advanced tools
A Catbox external caching strategy
var Catbox = require('catbox');
var DynamoDB = require('catbox-dynamodb');
var options = {tableName: 'sampleTable'};
var policy = {expiresIn: 10000};
var client = new Catbox.Client(DynamoDB, options);
var cache = new Catbox.Policy(policy, client, 'segment');
region
- the DynamoDB region within AWS. Defaults to 'us-east-1'
.tableName
- the table in DynamoDB you wish to use. Needs to be within the specified region.hashAttribute
- the attribute specified as the Hash key in the table. Defaults to 'segment'
rangeAttribute
- the attribute specified as the Range key in the table. Defaults to 'id'
At this point in time it is assumed that a table has been created prior to using this caching strategy.
When the table is created it will need to have the Primary Key set to Hash and Range.
If you do not set Hash to 'segment'
and Range to 'id'
, you will need to specify these in the options for the strategy to work correctly.
You will also need to make sure that you have credentials in some place that the application can see them. For guidance, please see this article.
Note that running the test suite will actually run the tests against DynamoDB.
node test
FAQs
A DynamoDB external caching strategy for Catbox
The npm package catbox-dynamodb receives a total of 1 weekly downloads. As such, catbox-dynamodb popularity was classified as not popular.
We found that catbox-dynamodb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.