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
http://en.wikipedia.org/wiki/Cache_algorithms
http://www.ag-nbi.de/lehre/0607/V_NBI/folien/08-Caching.pdf
http://caching.ulf-wendel.de/ersetzungsstrategien/lru_variationen.php
http://209.85.129.104/search?q=cache:gTIby33gQG0J:www.cs.usask.ca/faculty/carey/papers/webcaching.ps+%22caching+strategies%22+lru&hl=de&ct=clnk&cd=9&gl=ch&client=firefox-a
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
Hi,
Thank you for your great tool.

What do you think about Adaptive Replacement Cache (ARC) ? it seems Outperforms LRU.


http://domino.research.ibm.com/library/cyberdig.nsf/1e4115aea78b6e7c85256b360066f0d4/d6fe9a14c67ab32e85256ce500621a9a?OpenDocument
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,

http://www.almaden.ibm.com/cs/people/dmodha/arc-fast.pdf
http://www.almaden.ibm.com/cs/people/dmodha/ARC.pdf

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