0
votes

What is the mechanism by which the cache and cache entries work? When is it that the data from the cache server is retrieved?

If a new client connects to Apache Ignite and calls the Ignite#getOrCreateCache() by passing in a name of cache that already exist, does the entire cache get downloaded?

After getting a reference to an existing cache and calling the IgniteCache#get("key") does only the value associated with the key gets returned or the entire cache?

1

1 Answers

0
votes

The mechanism by which cache entries work is as follows:

  1. You call IgniteCache#get(key) on a Ignite client. Ignite determines which is the closest server from where this key's value can be retrieved or if a near cache is enabled in the Ignite Client, then it checks if the key's value is present in the near cache or not.
  2. The key's value is then serialized on the server side and sent across the network to your Ignite client(provided the value is not in near cache or the Ignite server is not on the same machine).
  3. The Ignite Client De-serializes the value and returns the object.

Only the specific value is retrieved from the Ignite server and the entire cache is never downloaded on your client.

P.S. Whenever you ask questions related to Apache Ignite use the tags grid-gain and ignite.