How to build cache with MicroStream? #519
Replies: 3 comments 4 replies
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Hi, There is one important detail regarding boxed primitives: Some Java-APIs may return instances from an internal cache, instead of creating new instances (e.g.: java.lang.Integer.valueOf(int)). In your example both fields of the Users can ether reference a shared object or independent objects, it depends on the objects they reference. When working with Microstream, you’re working with java objects that reference each other, they build an object graph where the objects are nodes and references are the edges. When Microstream persists that graph objects are not duplicated, primitive values are part of the node. |
Beta Was this translation helpful? Give feedback.
-
Yes, if you need to save memory reducing the number of persisted objects is a good idea as every persisted objects also creates some management overhead in Microstream in addition to its data. |
Beta Was this translation helpful? Give feedback.
-
Hello MicroStream team,
I want to build a cache that uses MicroStream to store Objects which can be Set, List or just a Pojo object. These pojos objects can be repeatedly saved at runtime. Is there a way to not have to duplicate these Pojos in MicroStream's memory?
Beta Was this translation helpful? Give feedback.
All reactions