Socket
Socket
Sign inDemoInstall

@forge/cache

Package Overview
Dependencies
150
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @forge/cache

Forge Cache methods


Version published
Weekly downloads
398
decreased by-13.67%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

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");

FAQs

Last updated on 29 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc