5 Replies Latest reply on Feb 14, 2013 7:25 AM by Mircea Markus

    Retrieve all items in Local Cache

    jacktrades Newbie

      I was surprised when reading this:

       

      methods like Map.keySet(), Map.values() and Map.entrySet() are expensive (prohibitively so when using a distributed cache) and frequent use of these methods is not recommended.

       

      Using inifinispan on Jboss AS 7.1, I thought about using it exactly because I was hoping to retrieve all the items in the cache with a given expiration time.

       

      1. Is it really a bad practice to retrieve every item (values mainly) in the cache?

      2. How to do it?

       

      No eviction, no clustering, no transactions, no cache storing/loading just plain local cache with expiration.

       

      Cache is intended to be Read Only.