Cache cleanup strategy

Topics: Developer Forum, Project Management Forum, User Forum
Dec 20, 2007 at 8:59 PM
Edited Dec 20, 2007 at 9:07 PM
With the new available configuration to set a size on the cache option, we need a strategy for cleanup.

I decided to implemente the following approach for cleanup's:

- CacheItemPriority: A new option will be created where objects which are added to the cache receives a priority attribute.
- LRU: Least Recent Used: The objects with the oldest request's will be deleted
- LFU: Least Frequently Used: Means the object's witch are used less will be deleted from the cache / if all objects are used in same frequency the objects will be used in a randomized order
- Pitkow/Recker: Like LRU, but if they used on same day they will not be deleted
- Timebased: The objects with the smallest time left in the cache will be deleted, in case all objects are used with max time, they will be deleted randomized
- SIZE: Delete always biggest objects until it received the size of FillFactor
- Lowest-Latency-First: Delet smallest objects until configured FillFactor reached

Within the app.config file the customer will be able to define his clean type within a key.

As a second step we can make a mix of the different patterns / strategy.

- Hybrid: Makes a combination between several parameters: TimeTaken, Amount of Requests, Size, Cache Life Time
each parameter receives a number between 1 - n and those with the highest / lowest numbers will be deleted until configured FillFactory reached.

More inputs about this issue are highly welcome!!!!

// some links with additional information
Dec 20, 2007 at 9:02 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Dec 23, 2007 at 10:16 PM
Pitkow/Recker pattern will not be implmented - no usage found so far. if somebody has usage for it feel free to clarify
Jan 28, 2008 at 2:56 PM
Thank you for your great tool.

What do you think about Adaptive Replacement Cache (ARC) ? it seems Outperforms LRU.
Jan 28, 2008 at 11:14 PM
This seems to be very intersting for Cache Cleanup, I will make some test within the next month and if I see its working fine i will integrate it. is this a decision need for you to use indeXus.Net Shared Cache?

regards, roni
Jan 28, 2008 at 11:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 29, 2008 at 9:14 AM
Hi, thank you for your instant reply,
I'm just investigating for distributed cache implementation in order to use in our web project. I raise the question because I've investigated few implementations and wonder why the ARC is not implemented because it demonstrated a better performance than LRU.
IBM has a paper on this matter with tests for cache replacement algorithms,

Thank you
Jan 29, 2008 at 12:08 PM
as you maybe recognized I have created a workitem for this issue. we will def. consider to
implement this option but not within the next few days due higher priority tasks.

regards, roni