directory-fortress mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Sindberg <>
Subject SV: Cache lifecycle
Date Tue, 01 Dec 2015 10:23:40 GMT
>From : Jan Sindberg []
> I find that the Ehcache is renewed whenever I create a new AccessMgr - by
> that I mean that the instances does not share a cache. So if I want to
> maximize performance in my application, then I need to create and keep a
> global singleton instance. I have yet to test that the cache actually runs out
> and is refreshed if I keep a singleton.

I am using the default ehcache.xml configuration with timeToIdleSeconds="600" and timeToLiveSeconds="600".
I find that if I keep an accessMgr and creates a new session, then there is no delay on changes,
which means that I don't see any caching? 

In our application I set a breakpoint in a class with a static accessMgr. Then I fire up some
evaluation of code fragments and do this:
Session session = accessMgr.createSession(new User("test"), true);

Then I add or remove roles in Fortress Commander and repeat. The change is instant. I don't
think that Fortress Commander knows how to reset the cache in my application? I was considering
implementing a reset through our event-bus, but it looks like there is no need?

View raw message