-
1. Re: Refresh Policy implementation.
jaikiran Dec 14, 2005 9:54 AM (in response to incivinci)I believe, you are talking about evicting objects from cache once they have lived for some amount of time. If so, have a look at Section 8: Eviction Policy at:
http://docs.jboss.com/jbcache/current/TreeCache/html/ -
2. Re: Refresh Policy implementation.
incivinci Dec 14, 2005 10:02 AM (in response to incivinci)Thanks for the reply.
From the document, I understand the eviction policy is implemented for all cached object under a FQN node. How can I make it specific for an individual object? Individual object within a node can have different time to live requirements. -
3. Re: Refresh Policy implementation.
jaikiran Dec 14, 2005 10:06 AM (in response to incivinci)You can configure eviction policy for a 'REGION'.
Definition of a region:" Region is a group of nodes where they posses the same eviction policy, e.g., same expired time. In TreeCache, region is denoted by a fqn, e.g., /company/personnel, and it is recursive. In specifying the region, the order is important. For example, if /org/jboss/test specified before /org/jboss/test/data, then any node under /org/jboss/test/data belongs to the first region rather than the second. Note also that whenever eviction policy is activated, there should be always a /_default_ region where it covers all the eviction policy not specify by the user."
Have a look at Section 8.2 for more details about the same.
http://docs.jboss.com/jbcache/current/TreeCache/html/ -
4. Re: Refresh Policy implementation.
jaikiran Dec 14, 2005 10:07 AM (in response to incivinci)If i am not wrong, what you are saying is that you want specify different eviction policy for different "keys" inside a single node. Is this what you want?
-
5. Re: Refresh Policy implementation.
jaikiran Dec 14, 2005 10:09 AM (in response to incivinci)My understanding is that eviction is done at node level and not at key level.
-
6. Re: Refresh Policy implementation.
incivinci Dec 14, 2005 10:13 AM (in response to incivinci)If my understanding is correct. A region can recursively include multiple nodes and the eviction policy for that region can be defined in the configuration file. Again it applies to all objects in that region.
I would like to selectively do this for a object so that it can be refreshed with data from the underlying primary datasource. -
7. Re: Refresh Policy implementation.
incivinci Dec 14, 2005 10:16 AM (in response to incivinci)You got my requirement correct.
-
8. Re: Refresh Policy implementation.
incivinci Dec 16, 2005 8:23 AM (in response to incivinci)I am revoking this thread.
I want to check for the expiry of each key in a node.
What is the feasibilty of implementing the process method of EvictionAlgorithm and recursing through data nodes to check for the staleness of the objects? -
9. Re: Refresh Policy implementation.
ben.wang Dec 18, 2005 10:40 PM (in response to incivinci)It is not possible now since the eviction is based on TreeCacheListener event of whose granularity is node based. We have the granularity level on the roadmap though. It can be 1.4 and later.
-Ben