Open vearne opened 10 months ago
actually we keep values in the heap. Could you elaborate?
I have a scenario where I want to store 10,000,000 key-value in the local cache, but this value is a relatively complex object. According to the current logic of bigcache, the value will be serialized into bytes for storage, and then actually, when I want to use Sometimes, I need to deserialize value from bytes into objects. Since this service is a high-frequency request, value will be serialized into objects repeatedly, causing a lot of CPU consumption. So I wonder if I can add a cache and store high-frequency key-values directly in the map (for example, using segmentation locks). This can reduce the cost of deserializing values from bytes into objects.
Like ehcache,Some hotspot key-values reside directly in the heap, while other key-values are stored in the original way.