- 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.
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?
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.
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.
Vladimir, it sounds great, but I cannot access the source code. Could you please check ?
I'm sorry, the git repo is public now. Let me know if you have any questions.