Skip to content

spatzle/LRUCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

run

when run, it runs main & shows an example of LRUCache usage

python lrucache.py

Unittests:

nosetests

(to use nosetest, if nose is not installed, pip install nose)

design decisions

I was going to use a list to keep track of orders w/in the dict, but I find it's just easier to use the interface of heapq, for quickly accessing the least frequently used item, and log n time to remove an item (which would be done frequently)

About

LRUCache - python LRUCache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages