« Return to Thread: ehcache via Plexus

Re: ehcache via Plexus

by Toby Stevens :: Rate this Message:

Reply to Author | View in Thread


Justin, there are a couple ways of doing this.

in 1.2.1 (or 1.3) if your inside your realm, you can get the the AuthorizationCache getAuthorizationCache JSecurity will also soon have a authorization Cache. (https://issues.apache.org/jira/browse/KI-58) 


in 1.3 you could get a access to the EhCache by using:

@Requirement
private PlexusEhCacheWrapper cacheManager;

from the https://svn.sonatype.org/spice/trunk/plexus-ehcache

All this does is load the interpolated ehcache.xml file to configure ehcache.



On Mar 6, 2009, at 7:38 PM, Edelson, Justin wrote:

Is there a way to get a reference to the ehcache CacheManager via Plexus in Nexus? The only reference I could find (I'm still looking at the 1.2.1 codebase) is in EhCacheCacheManager, but it's a private field.
 
I'm trying to configure caching within the Crowd Plugin and it seems like it would make sense to reuse the existing CacheManager, especially given the path interpolation that happens inside the EhCacheCacheManager class.
 
Thanks,
Justin

 « Return to Thread: ehcache via Plexus