Starting from version 3.X Hazelcast returns copy of the original object that is stored in a distributed map with near cache enabled, as opposed to version 2.5 where original object was returned.
This behavior allowed local modifications of entries stored in the map and GET operations was fast.
Now, with version 3.X it stores binary object in near cache, and it causes deserialization on every GET, which significantly impacts performance. Is it possible to configure Hazelcast 3.4.2 Map's Near Cache to return reference to original object, and not a copy of the original entry?
In the
<near-cache>
section, if you set<in-memory-format>OBJECT</in-memory-format>
<cache-local-entries>true</cache-local-entries>
you should get the same instance returned.
This works for both client and member.