Here is the use case: we need to limit the amount of RAM use to N Mb and the objects memory consumption is much higher (let's say 10N Mb). We should be able to find a String value for the String key (map) as simple example.
So we'd prefer to respect our memory constraint and loose in performance and we assume some advanced caching strategy should be used.
Does Object support some advanced caching? Can we explicitly set the limit of RAM used and still work?
PS. As some alternatives we consider using more compact data structures (trie for example) taking into account we know the nature of our data.