Skip to content

bwanave/PriorityExpiryCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Priority Expiry Cache

The PriorityExpiryCache has the following methods that can be invoked:

get(String key)
put(String key, String value, int priority, int expiry)
evict(int currentTime)

Rules:

  1. If an expired item is available. Remove it. If multiple items have the same expiry, removing any one suffices.

  2. If condition #1 can't be satisfied, remove an item with the least priority.

  3. If more than one item satisfies condition #2, remove the least recently used one.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages