On Wed, Jan 12, 2011 at 2:53 PM, Marvin Addison <[email protected]>wrote:
> > Retrieving that information can be very expensive for anything other than > > the JPA and In-Memory mechanisms, and in some cases impossible without > > actually explicitly storing that information (i.e. Memcached). > > Can you explain why MemCacheTicketRegistry#getTickets() isn't > supported? I can't imagine any fundamental reason that a cache system > wouldn't support some kind of iteration as needed here. That's not to > say that Memcached does in fact support iteration over cache entries, > but that it ought to. > As I said, Memcached doesn't support it: http://dustin.github.com/java-memcached-client/apidocs/net/spy/memcached/MemcachedClient.html http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt It is possible I missed it in both the API and the protocol, but as far as I know you can't do it. > I would like to see a query API be exposed by the ticket storage > components to support use cases like this. Is a query interface to > SessionStorage a reasonable feature for 4.0? > > No its not reasonable if the bulk of the mechanisms don't support some it internally (like JPA does). Otherwise it can become an extremely expensive operation. Most do not recommend you do anything over the entire cache. Infinispan recommends it only for test/debug and not for production: http://docs.jboss.org/infinispan/4.0/apidocs/org/infinispan/Cache.html#entrySet%28%29 We've been able to support lookup by User ID in CAS4 because its a relatively isolated event (i.e. the odds of the same person attempting to manipulate two sessions they own at the same time is relatively minimal). In most instances we store a list keyed by userid of their sessions. This might scale in some other limited scenarios. Cheers, Scott > M > > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
