-
1. Re: Implementing LDAP cache store, a few questions
william.burns Apr 1, 2016 9:56 AM (in response to vdzhuvinov)- This seems like it should work. The created date as you found is indeed only set when expiration is enabled for that entry though. Also you should be careful with maxIdle, it doesn't work as you may expect in a clustered cache.
- It is thread safe. The only state shared between these is the StreamingMarshaller which uses thread local variables for its shared state.
-
2. Re: Implementing LDAP cache store, a few questions
vdzhuvinov Apr 1, 2016 2:24 PM (in response to william.burns)Thanks, this will help us improve the code further.
I have another question about a method of the cache loader interface:
The AdvancedCacheLoader has a size() method, but for some reason Infinispan doesn't seem to call it. When Map.size() is called, this results in the process() getting called, which causes the cache store to iterate over all entries (with fetchValue=true and fetchMetadata=true). Computing the size therefore turns into a rather expensive operation. Is this expected behaviour?
-
3. Re: Implementing LDAP cache store, a few questions
william.burns Apr 1, 2016 4:48 PM (in response to vdzhuvinov)The size method was an initial thought to have a way to more quickly ascertain how many entries there are. Unfortunately while on paper it sounds great, but in practice it is a different matter.
The problem is that it is only useful when you have a shared cache store without passivation. In any other configuration the size method would produce incorrect results. I have some tasks to revamp the Cache Loader APIs for ISPN 9, and this is one I was definitely going to change. Either we would get rid of the method or use the size method when the configuration is correct.
-
4. Re: Implementing LDAP cache store, a few questions
vdzhuvinov Apr 12, 2016 12:03 PM (in response to william.burns)Hi William,
Our LDAP store impl is complete now. We would like to contribute it to the community and we released it under the Apache 2.0 software licence. The package is fully documented and has a test suite based on an in-memory LDAP server.
http://www.javadoc.io/doc/com.nimbusds/infinispan-ldap-cache-store/
-
5. Re: Implementing LDAP cache store, a few questions
nadirx Apr 14, 2016 1:46 AM (in response to vdzhuvinov)Vladimir, it sounds great, but I cannot access the source code. Could you please check ?
-
6. Re: Implementing LDAP cache store, a few questions
vdzhuvinov Apr 14, 2016 1:59 AM (in response to nadirx)I'm sorry, the git repo is public now. Let me know if you have any questions.