Skip to content

nathan7/ttl-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ttl-pool

a pool of expiring things

Installation

npm install ttl-pool

API

TTLPool(function onExpiry(name, explicit))

TTLPool(ttl, function onExpiry(name, explicit))

Returns a fresh TTL pool, with an optional default TTL.

ttlPool.add(id)

ttlPool.add(id, ttl)

Adds something to the pool.

ttlPool.ping(id)

ttlPool.ping(id, ttl)

Resets the TTL for something.

ttlpool.remove(id)

Removes something from the pool silently.

ttlPool.expire(id)

Expire something in the pool explicitly.

About

a pool of expiring things

Resources

Stars

Watchers

Forks

Packages

No packages published