I had debugged the near cache once and I found that near cache simply
stores the entries concurrent hashmap in deserialized format.

But be careful with near cache usage. I faced many issues and finally
removed it.
I had reported an issue on this forum but I couldn't not create reproducer
for it but it used give give me exceptions in running application. Check
near cache issue on user list.


On Thu 12 Dec, 2019, 9:09 PM Cong Guo <nadbpwa...@gmail.com wrote:

> Hi,
>
> My application needs to read all entries in the cache frequently. The
> entries may be updated by others. I'm thinking about two solutions to avoid
> a lot deserialization. First, I can maintain my own local hash map and
> relies on continuous queries to get the update events. Second, I can use a
> NearCache, but if the data in NearCache are still serialized, this method
> does not work for my application.
>
> Thanks,
> Nap
>
> On Thu, Dec 12, 2019 at 5:37 AM Ilya Kasnacheev <ilya.kasnach...@gmail.com>
> wrote:
>
>> Hello!
>>
>> It is actually hard to say without debugging. I expect that it is
>> BinaryObject or primitive type or byte[].
>>
>> It is possible to enable onheap caching, in this case objects will be
>> held as is, and also sed copyOnRead=false, in this case objects will not
>> even be copied.
>> However, I'm not sure if Near Cache will interact with onheap caching.
>>
>> Why does it matter for your use case?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> ср, 11 дек. 2019 г. в 22:54, Cong Guo <nadbpwa...@gmail.com>:
>>
>>> Hi,
>>>
>>> Are the entries stored in local NearCache on my client node in the
>>> format of deserialized java objects or BinaryObject? Will the entry in
>>> local on-heap NearCache be deserialized from BinaryObject when I call the
>>> get function?
>>>
>>> Thanks,
>>> Nap
>>>
>>

Reply via email to