Skip to content

Implementation of least recently used (LRU) cache

Notifications You must be signed in to change notification settings

chenleishen/lrucache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

lrucache

Implementation of least recently used (LRU) cache.

Instruction to Run

The implementation is available in a node script. To run it, the easiest way is to install node, which comes with the node command line that allows you to run the script via command node lruCache.js.

Install the latest node version here.

LRUCache

The LRUCache class is available in lruCache.js, can be exported via export default LRUCache.

Available methods:

  • get(key) - get cache value via key
  • put(key, value) -
  • del(key) - delete a cache value based on key if it exist, otherwise nothing is deleted.
  • reset(key) - removes all cache

About

Implementation of least recently used (LRU) cache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published