I just commited the first set of revisions for the refreshable cache.
You use it the same way you use the existing cache except instead of
using CachedObject, you use RefreshableCachedObject, and then you must
pass it an Object which implements Refreshable (just needs a public void
refresh()).
When we were discussing this in the list, there were some more features
that people are asking for. I also have another addition I want to
discuss:
1) Add a read/write lock object for accessing the items in the cache.
This will prevent multiple threads from creating the same cached object
at the same time.
2) Add a facility for RefreshableCachedObjects which are removed from
the cache when they haven't been accessed in some period of time. When
someone requests an object from the cache, the access time for that
object is updated to the current time. If the lastAccessTime + some ttl
value is not later than the time when the housekeeping thread checks,
the object is removed.
Any comments, or things I'm forgetting?
-Nissim
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]