
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@arcjet/cache
Advanced tools
@arcjet/cacheArcjet cache interface and implementations.
This is an internal utility to help us cache some things in memory.
This is an internal Arcjet package not designed for public use. See our Get started guide for how to use Arcjet in your application.
This package is ESM only. Install with npm in Node.js:
npm install @arcjet/cache
import { setTimeout } from "node:timers/promises";
import { MemoryCache } from "@arcjet/cache";
const cache = new MemoryCache<string>();
cache.set("namespace", "key", "value", 2);
console.log(await cache.get("namespace", "key"));
// => [ 'value', 2 ]
await setTimeout(2001);
console.log(await cache.get("namespace", "key"));
// => [ undefined, 0 ]
MemoryCache#constructor()Instantiate the MemoryCache using new MemoryCache() without any arguments.
MemoryCache#get(namespace: string, key: string): Promise<[T | undefined, number]>Attempts to retrieve a value from the cache. If a value exists, it will be returned with the remaining time-to-live (in seconds).
Non-string arguments will cause the returned promise to reject.
MemoryCache#set(namespace: string, key: string, value: T, ttl: number): voidMakes a best attempt at storing the value provided until the time-to-live specified.
Non-string arguments will cause the function to throw.
FAQs
Arcjet cache interface and implementations
The npm package @arcjet/cache receives a total of 40,691 weekly downloads. As such, @arcjet/cache popularity was classified as popular.
We found that @arcjet/cache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
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.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.