Les, thanks for your very timely response. Since posting the earlier JSON message I figured I'd just try doing straight object serialization to a ByteArrayOutputStream and Base64 encoding the byte array, forgetting about JSON, and I'd just got that working nicely when I read your response (although I used standard Groovy stuff and not the Shiro utilities, which I was unaware of). I may well go down that path as in reality I have no real requirement for the human-readability of the stored session objects which JSON would provide.

You're right about Shiro hitting the session cache frequently - I traced a request and was surprised how often the 'get' method of Cache is called. Redis is blindingly fast but you're right, the network round trips would be best avoided. Isn't there some staleness risk in using a local in-memory cache, though?

Reply via email to