shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Les Hazlewood <lhazlew...@apache.org>
Subject Re: suggested values for missing cache data.
Date Fri, 26 Apr 2013 21:16:46 GMT
Hi Claude,

the size() and keys() methods are not actually used by Shiro.  They're a
remnant from long ago in case people wanted that information.  They will be
removed in Shiro 2.x since Shiro doesn't depend on them.

The values() method is however used for native session management; the
native SessionManager will get the activeSessions's cache entry and then
get all cache entries (activeSessionsCache.getValues()) to periodically
invalidate stale ones.  However, this method is only called if you are 1)
using native sessions and 2) your SessionDAO implementation is a caching
session dao that delegates the getActiveSessions() call to your cache.

If you are using standard servlet container sessions or the above 2
conditions do not apply to your use case, you can ignore this.

HTH,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282


On Thu, Apr 25, 2013 at 1:56 AM, Claude Warren <claude@xenei.com> wrote:

> I am working with an implementation of Cache for which the underlying
> storage does not provide access to the underlying size, key list or value
> collection.
>
> Are there recommended default values for size.
>
> Currently we are returning 0 for size, but perhaps -1 would indicate that
> the value is not available?  Any hints in this area would be appreciated.
>
> are the key list and value collection required for shiro to function
> properly?
>
> --
> I like: Like Like - The likeliest place on the web<
> http://like-like.xenei.com>
> Identity: https://www.identify.nu/user.php?claude@xenei.com
> LinkedIn: http://www.linkedin.com/in/claudewarren
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message