You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by Les Hazlewood <lh...@apache.org> on 2009/01/09 02:52:43 UTC

Default CacheManager strategy

Now that SoftHashMapCache is available and production quality in that it
won't introduce memory leaks (making it a better option than a
HashtableCache), we can remove the hard dependency on Ehcache in JSecurity
core.

So, now the question is:

1.  Do we enable a MemoryCacheManager (which would use a SoftHashMapCache)
automatically by default? or
2.  Do we disable caching entirely, expecting the end-user to explicitly
configure a CacheManager to enable it?

If we think #1 is the preferred, and an end-user does NOT want caching
enabled at all, we could easily provide a NoOpCacheManager that they would
configure explicitly.  This dummy implementation would satisfy the
CacheManager calls, it would just do nothing.

If we think #2 is the preferred, it is very easy for the end-user to enable
it.  Something like this in the .ini config:

cacheManager = org.jsecurity.cache.MemoryCacheManager
securityManager.cacheManager = $cacheManager

What does everyone think?

Re: Default CacheManager strategy

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Fri, Jan 9, 2009 at 3:04 AM, Tim Veil <tj...@gmail.com> wrote:
> My personal preference would be to enable a cache manager by default.  If
> the optimal/recommended jsecurity configuration includes the use of a cache
> manger then the default configuration should use a basic cache manager
> implementation.  More advanced users could disable or enhance this
> configuration.

+1

/niklas

Re: Default CacheManager strategy

Posted by Jeremy Haile <jh...@fastmail.fm>.
> My personal preference would be to enable a cache manager by  
> default.  If the optimal/recommended jsecurity configuration  
> includes the use of a cache manger then the default configuration  
> should use a basic cache manager implementation.  More advanced  
> users could disable or enhance this configuration.

+1

I also think we should try to make it as easy as possible to enable a  
different cache manager, like ehcache - since most professional users  
will probably want to do that.



Re: Default CacheManager strategy

Posted by Tim Veil <tj...@gmail.com>.
My personal preference would be to enable a cache manager by default.   
If the optimal/recommended jsecurity configuration includes the use of  
a cache manger then the default configuration should use a basic cache  
manager implementation.  More advanced users could disable or enhance  
this configuration.


On Jan 8, 2009, at 8:52 PM, Les Hazlewood wrote:

> Now that SoftHashMapCache is available and production quality in  
> that it
> won't introduce memory leaks (making it a better option than a
> HashtableCache), we can remove the hard dependency on Ehcache in  
> JSecurity
> core.
>
> So, now the question is:
>
> 1.  Do we enable a MemoryCacheManager (which would use a  
> SoftHashMapCache)
> automatically by default? or
> 2.  Do we disable caching entirely, expecting the end-user to  
> explicitly
> configure a CacheManager to enable it?
>
> If we think #1 is the preferred, and an end-user does NOT want caching
> enabled at all, we could easily provide a NoOpCacheManager that they  
> would
> configure explicitly.  This dummy implementation would satisfy the
> CacheManager calls, it would just do nothing.
>
> If we think #2 is the preferred, it is very easy for the end-user to  
> enable
> it.  Something like this in the .ini config:
>
> cacheManager = org.jsecurity.cache.MemoryCacheManager
> securityManager.cacheManager = $cacheManager
>
> What does everyone think?