I set up a simple cache, using Integerfor key and Doublefor value. After the cache cache.calculateInMemorySize() / cache.getMemoryStoreSize()is full, the ratio is constant at 344 bytes per element. I expect overhead, but my payload is (32 + 64) 96 bits or 12 bytes, so the overhead is as much as 332 bytes - or am I completely misunderstood how this works? If not, what if something, can I do to reduce overhead?
The cache is intended for storage only in memory. We want everything to be there, so overflow and expiration are not needed, and since we can quickly populate an external data source (just not fast enough to use it as the main data source), persistence is also not needed.
Using version 2.4.0.
source
share