-
1. Re: Retrieve all items in Local Cache
an1310 Feb 13, 2013 9:43 PM (in response to jacktrades)In local mode, these methods function like a normal CHM. In my local cache implementations in my production environment, I use these methods without issue.
In distributed mode, keep in mind that these methods will pull only the local entries in the data containers, which will also include any replicas configured by numOwners. You can still use it, but you will just have to write a framework around its limitations.
Regards,
Erik
-
2. Re: Retrieve all items in Local Cache
jacktrades Feb 14, 2013 6:02 AM (in response to an1310)What about using listeners to retrieve entities as they are inserted into the cache?
e.g. Use @CacheEntryCreated listener to read Cache entries when they are created.
-
3. Re: Retrieve all items in Local Cache
alesj Feb 14, 2013 6:33 AM (in response to jacktrades)1 of 1 people found this helpful1. Is it really a bad practice to retrieve every item (values mainly) in the cache?
Yes.
Or, perhaps, use Infinispan's MapReduce?
-
4. Re: Retrieve all items in Local Cache
jacktrades Feb 14, 2013 7:17 AM (in response to alesj)So far MapReduce seems like an overkill for this situation.
This cache would normaly have less than 1K entries.
-
5. Re: Retrieve all items in Local Cache
mircea.markus Feb 14, 2013 7:25 AM (in response to jacktrades)1 of 1 people found this helpfulAs Erik suggested, If you use a local cache withouth loaders, I don't see any problem using these operations as often as you feel like.