shiro
shiro copied to clipboard
[SHIRO-849] Adds cache module for JCache
This will allow for any JCache implementation to work with Shiro, as well as new versions of EhCache & Hazelcast.
Fixes: SHIRO-816 Fixes: SHIRO-479
NOTE: This currently targets 1.8 (which would need to be bumped to 1.9 before merging)
Going forward we could replace org.apache.shiro.cache with JCache, and update MemoryConstrainedCacheManager to be a safe fallback.
Created issue: https://issues.apache.org/jira/browse/SHIRO-849 (fix version left unset for now, but we can fill it in once we move forward)
LGTM. Can we move this forward? Thanks!
I'm not sure what the osgi related config should be: https://github.com/apache/shiro/pull/332/files#diff-fe1d5bdae7660405b02de35c849a3f235600c2e7c318f64b8635accfabf4b1abR77-R81
I'm guessing the above is wrong (given the hazelcast package name) anyone want to take a pass at that part?
After that I can clean it up (update the dependencies) and retarget main (potentially backporting where needed)
Maybe we could replace synchronized(this) with an AtomicWrapper?
I'm not sure what the osgi related config should be: https://github.com/apache/shiro/pull/332/files#diff-fe1d5bdae7660405b02de35c849a3f235600c2e7c318f64b8635accfabf4b1abR77-R81
I'm guessing the above is wrong (given the hazelcast package name) anyone want to take a pass at that part? After that I can clean it up (update the dependencies) and retarget
main(potentially backporting where needed)
Let me take a look, we just need to import the jcache package to not depend on jcache implementation. For Hazelcast, user needs to install the hazelcast jcache osgi bundle.
I will make some tests.
And agree, I will work on main branch first.