2 Replies Latest reply on Nov 12, 2014 8:13 AM by prashant.thakur

    Lazy Loading during Query

    prashant.thakur

      Will the query Interface lazy load the data if its not present in cache from the persistence store.

      For example I have an employee table cached containing 10 records for a manager ID.

      Due to previous requests 2 records are already in Cache. When I use Query interface and query based on Manager ID.

      Will this interface return me 10 records or only 2 records which are already cached.

      How do I ensure that all 10 records are loaded into Cache when such a query is fired.

        • 1. Re: Lazy Loading during Query
          anistor

          You'll get all the results that match your query, regardless of where are they located (memory or store) at the time of query execution. No need to do anything special.

          1 of 1 people found this helpful
          • 2. Re: Lazy Loading during Query
            prashant.thakur

            When we are overwriting Cache Load operation for Lazy load then what are the interface functions we would need to add to support this kind of requirement. Will it do a complete data query in DB to support this. If not how the delta to be loaded is identified by Infinispan.

            Can you please point me to some test cases or class in Infinispan implementing this logic for deeper understanding ?