Dmitriy, Thanks. Just so I understand: I am looking at the CacheStore example and the whole discussion on: http://apacheignite.readme.io/v1.1/docs/persistent-store
In that example the load() method takes a key which is then used automatically to query the underlying SQL persistent store and the results are served back to client. How about this scenario? I get the key in the load method and I first check to see if my data is in cache. If it is, I serve the result from cache, otherwise I go to persistent storage. Is this handled automatically by Ignite in the background and that's why the load() method in the example pays no attention to the possibility of the key/value already existing in memory? Or is that something I have to explicitly check for in the load() implementation? Thanks! On Mon, Jun 29, 2015 at 2:53 PM, Dmitriy Setrakyan <[email protected]> wrote: > > On Mon, Jun 29, 2015 at 12:38 PM, Ognen Duzlevski < > [email protected]> wrote: > >> How about SQL queries on ignite? Do they end up being translated into >> series of gets() and hence make use of the read-through CacheStore >> implementation? >> > > The answer is No. Queries are executed only on the in-memory data. To > support what you are suggesting, we would have to execute a query on the > database, get all the keys back, and then execute a bunch of cache.get(..) > calls for each returned key. Overall, this would be very slow and that's > why was not done for Ignite. > > Having said that, we can enhance our Hibernate integration to support this > use case. I will file a ticket. > > D. > >
