Hi Riccardo,

It depends on how you are asking for the record which is not in Ignite
cache. If you are doing this using *get* method of Ignite cache API it will
load this record from DB (if it's not already in Ignite cache), put it into
in-memory cache and return it to you.

But if you are using Ignite SQL and trying to obtain record using something
like this: *select * from my-cache where id=123 , * it will return you
nothing if such specific record wasn't already loaded into cache.

Igor

On Mon, Dec 5, 2016 at 8:14 AM, Riccardo Iacomini <
[email protected]> wrote:

> Hi Val,
> I have a related question regarding SQL queries. Does it mean that it
> cannot be used as cache layer for an operational DB? What if I ask for a
> record which is not currently in the cache, but is stored in the
> persistence DB? Will a get an empty result set or Ignite will ask it to the
> DB?
>
> Thank you in advance for the response. I looks like a silly question but I
> would like to be sure I got the use case for the SQL case.
>
>
>
> Riccardo Iacomini
>
>
> *RDSLab*
>
> On Fri, Dec 2, 2016 at 6:35 PM, vkulichenko <[email protected]
> > wrote:
>
>> Hi Riccardo,
>>
>> If you are working with SQL queries, then you have to load all required
>> data
>> into Ignite in advance. Ignite will not go to Cassandra in this case and
>> will return the result based only on entries that are already in caches.
>>
>> However, if you use key-value API, both read-through and write-through are
>> available. I.e. when you read an entry using get() method providing a key,
>> Ignite will load value for this key from Cassandra in case it's not in the
>> cache yet.
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Cassandra-cache-info-tp9370p9372.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Reply via email to