open-index/open-npm huggingface dataset:
npm package: @gomomento-poc/aws-cache-helpers
Description: Small proof of concept libraries to help you enable caching in AWS
Latest version: 0.2.3

# aws-cache-helpers

Various collection of JS utilities to help you enable caching with Momento in AWS.

![image](https://user-images.githubusercontent.com/5491827/212209590-45ac9d36-532a-459c-a8ea-154e8ac7733c.png)

## Usage

### AWS JS SDK v3 Middleware

```javascript
import {NewCachingMiddleware} from '@gomomento-poc/aws-cache-helpers';

const authToken = 'REPLACE_ME';
const db = DynamoDBDocumentClient.from(new DynamoDBClient({}));
db.middlewareStack.use(NewCachingMiddleware({
    tableName: 'my-ddb-table',
    momentoAuthToken: authToken,
    defaultCacheTtl: 86400,
    cacheName: 'default'
  }
));
```

### AWS DynamoDB Stream Lambda Handler
```javascript
import {NewStreamCacheHandler} from '@gomomento-poc/aws-cache-helpers';

const authToken = 'REPLACE_ME';
export const handler = NewStreamCacheHandler({
  tableName: 'my-ddb-table',
  momentoAuthToken: authToken,
  defaultCacheTtl: 86400,
  cacheName: 'default' 
});
```
npm package: @gomomento/sdk-nodejs-compression-zstd
Description: Compression extensions (zstd version) for Momento node.js SDK
Latest version: 0.117.2

{{ ossHeader }}

# `zstd` Compression Extensions for Momento Node.js SDK

This package provides extensions for the Momento Node.js SDK to support `zstd` compression and decompression of data that
is stored using the `CacheClient.set` function and accessed through the `CacheClient.get` function. Using compression
can significantly reduce your data transfer costs if your cache values are large text values, such as JSON objects.

This is an alternative to the main [`@gomomento/sdk-nodejs-compression`](https://github.com/momentohq/client-sdk-javascript/tree/main/packages/client-sdk-nodejs-compression) package, which provides similar extensions but uses the `gzip` compression library rather than `zstd`.  `zstd` may be slightly faster than `gzip` for certain types of workloads, but it is not yet supported in the node.js standard library, so this extension requires an additional binary dependency that may require extra steps to package into your production environment.

To use the library, you will need to install it from npm:

```bash
npm install @gomomento/sdk-compression-zstd
```

For more information, see:

* [Momento Developer Docs - Node JS SDK Compression](https://docs.momentohq.com/sdks/nodejs/compression.html)
* [NodeJS zstd compression example](https://github.com/momentohq/client-sdk-javascript/tree/main/examples/nodejs/compression-zstd)

{{ ossFooter }}