Hello,

in JBoss Labs, we are using a cache-like component, which holds some data based 
on what is present in a persistent store (SVN in our case). The key thing is 
that the data is:
1. always in the cache
2. renewed when the persistent store changes (so, when a change occurs, a new 
object based on the persistent data is created in the background and only when 
ready, replaces the old one).

This way, users always have the data fast (as it always read from the cache), 
maybe with the exception of first access to a key.

I was wondering if this is possible to achieve using 
CacheLoaders/EvictionPolicies, but I have doubts if it is possible? One problem 
is that in this case nodes should become evicted because of persistent store 
changes, not because operation on nodes have been done recently/frequently/etc. 
So it may be possible that the eviction mechanism isn't the proper one to use 
here.

The other problem is "renewing" a key in the cache: logically, it should be 
done using a cache loader. However here, it turns out this would be done when 
evicting a node (or the eviction policy can call the cache loader using 
CacheSPI ....)

Anyway, if you have any opinions on if it is possible to integrate the "my" 
cache with jboss cache, or any suggestions, please write :)

-- 
Adam

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071093#4071093

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071093
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to