Skip to content

gameofdatas/caching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caching

Supports various types of mem caching evictions algorithm. Currently, support

  • LRU (Least recently used)
  • LFU (Least frequently used)
  • FIFO/LILO (First in First out/Last in Last out)

LRU

  • Used Doubly LinkList and Map to get, set the data in O(1).

LFU

  • Used 2 LinkList and Map to get, set the data in O(1).

FIFO

  • Used Queue to perform all operations in O(1).

Steps to run

The code expects two args:

  • Capacity - Maximum capacity of cache.
  • CachingEvictionAlgo - (fifo/lilo, lfu. lru).

About

In-memory caching Eviction Algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages