GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ahume/tiny-lfu-cache: Simple LFU cache. put and get.

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
test
test
 
 
.gitignore
.gitignore
 
 
.jshintrc
.jshintrc
 
 
.travis.yml
.travis.yml
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

NPM version Build Status Dependency Status

Simple LFU cache. put and get.

Suitable for use in browsers and Node.js.

Install

$ npm install --save tiny-lfu-cache

Usage

var LFUCache = require('tiny-lfu-cache');

var maxSize = 100;
var cache = new LFUCache(maxSize);
cache.put('key', 'value');
cache.get('key'); // returns 'value'

cache.flush(); // Empties the cache

LFU Eviction Policy

Once the cache reaches its maximum size, the least frequently used (LFU) item is evicted.

If items in the cache have equal frequency of use, then the least recently used (LRU) item is evicted.

Development

npm install
npm test

License

MIT © Andy Hume

About

Simple LFU cache. put and get.

Resources

Readme
Activity

Stars

12 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.