Tom910 / s3-fifo-cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

s3-fifo-cache

More information about this algorithm you can find in this article

size: 0.8Kb after gzip

How to Install

npm install --save s3-fifo-cache

How to Use

import { S3FifoCache } from 's3-fifo-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

License:MIT License


Languages

Language:TypeScript 99.8%Language:JavaScript 0.2%