0.4.0 • Published 1 year ago

@gomomento-poc/node-keyv-adaptor v0.4.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

project status project stability

What and why?

This project is a Momento storage adaptor for Keyv

TTL functionality is handled directly by momento so no timestamps are stored and expired keys are cleaned up internally.

Installation

npm install --save @gomomento-poc/node-keyv-adaptor

Usage

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!

0.3.0

2 years ago

0.4.0

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago