
Research
/Security News
Two Joyfill npm Beta Releases Compromised to Deliver DEV#POPPER Remote Access Trojan
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.
@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 51,743 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
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.

Security News
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.