You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by Claude Warren <cl...@xenei.com> on 2013/04/25 10:56:17 UTC
suggested values for missing cache data.
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
Re: suggested values for missing cache data.
Posted by Les Hazlewood <lh...@apache.org>.
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 <cl...@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
>