Hello Antoine,
it cannot really be done right now as cached content is stored in the HTTP session of the
user (which makes sense since it has the same lifecycle than the user).
The code is located in org.jboss.portal.portlet.aspect.cache.ConsumerCacheInterceptor.
Here the content of the cache is retrieved/stored in the PRINCIPAL_SCOPE context.
This context is the (http session + the principal id) : the http session for the lifecycle
management and the principal id for security reasons (so a user does not see the cached
content from another user which can happens on logout operations when the session cookie
stays the same).
So basically you can modify this interceptor to store instead the content in a shared
cache and have that shared cache expose operation through JMX. This interceptor is
declared in jboss-portal.sar/META-INF/jboss-service.xml and at this place you can replace
the default implementation by your.
For the cache you could use JBoss Cache has a field of your interceptor and expose
invalidation methods on the interceptor itself as it is already an MBean.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009056#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...