Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create a cache which evicts entries based on whether the cache size was hit or the TTL for the entry was hit. I couldn't find any code for a similar cache online using c++.

Has anyone found any documentation for this?

What I have tried:

Just tried a regular LRU cache until now based on capacity. I would like to add time to live parameter to that.
Posted
Updated 20-Oct-21 10:09am
Comments
[no name] 20-Oct-21 14:45pm    
And what you expect? That somebody here is doing the work for you?
Add a timestamp to the cache item and check the items.

1 solution

This might provide a good place to start : Multi Level Cache that Does Up To A Billion Lookups Per Second in C++[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900