
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
A loading cache data structure for web and node, written in TS.
Inspired by guava's LoadingCache.
yarn add yaloc
npm install --save yaloc
(Please see tests for the most up to date, guaranteed behaviour.)
import { LoadingCache } from 'yaloc';
const cache = new LoadingCache((key: WhateverType) => getValueFromRemoteSource(key));
await cache.get("foo");
await cache.get("foo"); // doesn't call `getValueFromRemoteSource` for `"foo"`
import { LoadingCache } from 'yaloc';
const cache = new LoadingCache<string, string>({
loader: (key) => getValueFromRemoteSource(key),
expireAfterAccess: 60 * 1000 // removes an entry, if it hasn't been accessed for a minute
expireAfterWrite: 5 * 60 * 1000 // removes an entry, 5 minutes after it has been loaded
refreshAfterWrite: 15 * 1000 // reloads an entry every 15 seconds
onRemove: ([key, value], removalCause) => { // called whenever an entry is removed from the cache
console.log(`value for ${key} is removed because ${removalCause}`);
}
})
timeUnit support for expire and refresh optionsmaximumSize supportLoadingCacheBuilder that is an alternative to passing all options new LoadingCache({ ... })WeakLoadingCache that is backed by WeakMap, probably without expiration features.FAQs
A loading cache data structure for web and node.
We found that yaloc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.