-
1. Re: LRU Eviction Policy is clearing the entire cache after M
fatefree Feb 21, 2008 7:48 AM (in response to fatefree)Is this feature even available in JBoss Cache as of the last production release?
-
2. Re: LRU Eviction Policy is clearing the entire cache after M
mircea.markus Feb 21, 2008 10:12 AM (in response to fatefree)Having maxAgeSeconds=300 will make all nodes be removed after 300 seconds, disregarding whether a node has been used e.g. 20 seconds ago.
Unfortunately, we expected that individual elements would expire after the time
Having setMaxAge=0 and timeToLive=300 would cause all the nodes that were not 'touched'(get the node, add a key/value to the node etc) for 300 secs to be evicted. e.g. if a node is touched every 200 secs it will never be evicted. Is this what you want? -
3. Re: LRU Eviction Policy is clearing the entire cache after M
fatefree Feb 21, 2008 11:17 AM (in response to fatefree)I believe I initially got the definition of a Node incorrect. I had thought that a Node was a cache Element, but instead I learned that its a Map of cache Elements.
What I am looking for is an eviction policy that expires individual elements in the cache, rather than the entire node. Does JBoss offer this out of the box, or is it limited to the Node level? -
4. Re: LRU Eviction Policy is clearing the entire cache after M
mircea.markus Feb 21, 2008 2:56 PM (in response to fatefree)It is limited at a node level.
What can be done, though is to put one key/value in each node. -
5. Re: LRU Eviction Policy is clearing the entire cache after M
fatefree Feb 21, 2008 6:17 PM (in response to fatefree)Unfortunately I dont think that is an option for us, since every element of the cache has a dynamic key and value, and I'm not sure it would be efficient to search every node every time we needed to pull from cache.
I guess another alternative is to put an object containing the value and timeout of the element into the cache, and when it is retrieved see if the time has expired. The only problem is some elements may never be retrieved again and would sit there. I guess theres no easy solution to this.. -
6. Re: LRU Eviction Policy is clearing the entire cache after M
genman Feb 21, 2008 7:03 PM (in response to fatefree)See this:
http://labs.jboss.com/file-access/default/members/jbosscache/freezone/docs/2.1.0.CR1/userguide_en/html/eviction_policies.html#d0e3423
-
7. Re: LRU Eviction Policy is clearing the entire cache after M
fatefree Feb 22, 2008 7:18 AM (in response to fatefree)Yes Ive read the expiration policy but it suffers from the same problem as its limited to expiring everything in the node at once, rather than the individual elements in the node
-
8. Re: LRU Eviction Policy is clearing the entire cache after M
liuhang781102 Feb 26, 2008 6:21 AM (in response to fatefree)If you want to use the evict policy with jboss cache, you must let your data separated by nodes. node is the management unit .