On 23 October 2012 14:53, Thomas Fromm <tf(a)tfromm.com> wrote:
On 23.10.2012 15:36, Sanne Grinovero wrote:
> Hi Thomas, what do you mean by "lost" entries? I'm pretty sure that if
> an entry can't be find in any node Infinispan will attempt to look it
> up from a CacheLoader.
>
Yes, if you know about the key. But size(), keyset() and so on are not
aware that this particular key is not loaded.
So you'll never know if you have all entries in cache... so you need to
dig into the cache loader by yourself :-/
This is a bit unsatisfying, rhauch wrote also ISPN ticket for this
problem :-)
This problem appears, when you start seeing ISPN not only as cache in
classic way, but as storage.
As storage you should use either:
- Map/Reduce (loads from CacheLoaders too)
- Query (indexes all types so you don't lose track of them)
- Hibernate OGM (model whatever you wan on it, including of course a
"load all" or "count" operation)
Cheers,
Sanne