@forge/cache
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

Library for Forge environment.

Usage example:

import cache from "@forge/cache";

const cacheClient = cache.connect();

await cacheClient.set("hello", "3", { ttlSeconds: 10 });

const result = await cacheClient.setIfNotExists("hello", "3", { ttlSeconds: 10 });

const result = await cacheClient.get("hello");

const result = await cacheClient.getAndSet("hello", "3", { ttlSeconds: 10 });

const result = await cacheClient.incrementAndGet("hello");

const result = await cacheClient.decrementAndGet("hello");

const result = await cacheClient.delete("hello");

const result = await cacheClient.scan("hello*", { cursor: "10", count: 10 });

const result = await cacheClient.leftPush("list", "3");

const result = await cacheClient.rightPop("list");

const result = await cacheClient.listLength("list");

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @forge/cache

Weekly Downloads

455

Version

0.8.0

License

UNLICENSED

Unpacked Size

53.7 kB

Total Files

26

Last publish

Collaborators

  • danwinterwijntjes
  • atlassian-cicd