Skip to content

Tom910/effective-cache

Repository files navigation

Cache

This is a repository for different caching algorithms

How to Install

npm install --save effective-cache

How to Use

S3-FIFO cache example

More information about this algorithm you can find in this article

size: 0.8Kb after gzip

import { S3FifoCache } from 'effective-cache';

const cache = new S3FifoCache(100);
cache.set("key", "value");
cache.set("key2", "value");
cache.get("key") // -> "value"

cache.has("key") // -> true

cache.delete("key");
cache.get("key") // -> undefined

cache.clear();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published