MorphiaOrg / morphia

MongoDB object-document mapper in Java based on https://github.com/mongodb/mongo-java-driver
Apache License 2.0
1.65k stars 456 forks source link

Entity cache configuration #1403

Open evanchooly opened 4 years ago

evanchooly commented 4 years ago

Is your feature request related to a problem? Please describe. Caching of loading entities, particularly references, is not currently configurable in 2.0. Add the knobs necessary to support this similar to 1.x.

see #476

evanchooly commented 4 years ago

perhaps wrap all fetches in a session and key the cache to the session ID. Would put the minimum driver version at 3.8 which is probably ok.