
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
This is a variant of Clock cache algorithm that keeps a ghost copy for an extended period of time. It could be useful for implementing shared session cache.
$ npm install hl-cache
new HLCache([options])
Create a cache pool.var cache = new HLCache({
// maximum size of the cache
max: 2000,
// cache entry time-to-live in milliseconds
lifespan: 2000
});
If the number of items in the cache pool exceeds max
, the item will not be store in the cache.
HLCache::get(key[, timestamp])
Get the value by key
. timestamp
is optional, it is used to indicate the time the visit comes from. If no value is provided, timestamp
is set to Date.now()
.
HLCache::set(key, value[, timestamp])
Set the value of key
to value
. timestamp
is optional, it is used to indicate the time the visit comes from. If no value is provided, timestamp
is set to Date.now()
.
HLCache::has(key)
Check if a key is in the cache.
length
Return total length of objects in cache.
This package use Map
and es6-map to polyfill Map
on old version of Node.
es6-map is install as optionalDependencies
. The dependencies section of your application's package.json
file must contain es6-map in order for the polyfill to work.
$ npm test
Half-life cache could (almost) guarantees consistent read in cache’s lifespan, which could be useful for implementing shared session cache.
Copyright (c) 2015 Jingwei "John" Liu
Licensed under the MIT license.
FAQs
A variant of clock cache for implementing shared session cache.
The npm package hl-cache receives a total of 0 weekly downloads. As such, hl-cache popularity was classified as not popular.
We found that hl-cache 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.