Skip to content

LRU Stands for Least Recently Used and LRU Cache help identify the least recently used items in a System.

Notifications You must be signed in to change notification settings

shikharkrdixit/LRUCacheImplementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

LRU Cache Implementation

LRU Stands for Least Recently Used. Here I have implemented a least recently used Caching system which sorts the system based on how recently each Element is being used.

Whenever, a process calls for an element, the system looks into the Cache if it exists there the system is returned. But if it is not present their the processor then looks into the Disk which takes longer time compared to that of the Caching System. Whenever, the cache becomes full the item least recently used is removed out of the Cache and a new item is included.

This LRU Cache can be implemented using a Hashmap and a Doubly Linked List, though here we have used a list and a hashmap.

The Hashmap consists of the Key and the Address of the corresponding Node, and the List contains the node with the Key and it's value.


Header files used :

Header files
iostream
list
unordered_map

Made with ❤️ by Shikhar .

github

About

LRU Stands for Least Recently Used and LRU Cache help identify the least recently used items in a System.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages