Guss you will need to provide more details for people to offer comments.
But I have two initial ones here:
1. Check into passivation feature in JBC. The cache get will only retrieve the data from the file store if it is not in-memory.
2. Check into PojoCache. Maybe thefine-grained replication and distributed object graph can help out.
Can the result of method calls be cached in a fine grained way in POJOCache? The docs all seems to make reference to caching fields instead of methods.
No, PojoCache only transparently stores fields; it has no way of knowing that you want the result of a method call to be stored.
Ok, I've been reading the docs on CacheLoaders. They seem like a promising solution.
It looks to me like if I create my own CacheLoader implementation that sits on top of this virtual, infinite tree I'm describing, then that might do the trick. As my objects are requested out of this custom CacheLoader, I could instantiate them on demand. This custom CacheLoader could wrap around a FileCacheLoader instance for simple passivation capability.