From 2700b1227a98fceddd1a5cb2d95b0b11cca5ff43 Mon Sep 17 00:00:00 2001 From: eaddingtonwhite Date: Fri, 7 Jul 2023 00:32:45 +0000 Subject: [PATCH] Update templated README.md file --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a067a07 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ + +logo + +[![project status](https://momentohq.github.io/standards-and-practices/badges/project-status-official.svg)](https://github.com/momentohq/standards-and-practices/blob/main/docs/momento-on-github.md) +[![project stability](https://momentohq.github.io/standards-and-practices/badges/project-stability-alpha.svg)](https://github.com/momentohq/standards-and-practices/blob/main/docs/momento-on-github.md) + + +

Keyv - Momento Keyv logo

+

This project is part of the Keyv suite.

+ +## What and why? + +This project is a [Momento](https://gomomento.com) storage adaptor for [Keyv](https://github.com/jaredwray/keyv) + +TTL functionality is handled directly by momento so no timestamps are stored and expired keys are cleaned up internally. + +## Installation + +```shell +npm install --save @gomomento-poc/node-keyv-adaptor +``` + +## Usage + +```ts +import KeyvMomento from "@gomomento-poc/node-keyv-adaptor"; + +const Keyv = require('keyv'); + +const keyv = new Keyv({ + store: new KeyvMomento( + new CacheClient({ + configuration: Configurations.Laptop.latest(), + credentialProvider: CredentialProvider.fromEnvironmentVariable({ + environmentVariableName: "MOMENTO_AUTH_TOKEN" + }), + defaultTtlSeconds: 6000 + }), + "default-cache", + ) +}) +``` + +---------------------------------------------------------------------------------------- +For more info, visit our website at [https://gomomento.com](https://gomomento.com)!