have many millions of aggregates (in DDD terms), and they are not depending on each other
keeping all of them in a live or hibernated process does not seem to be a valid options
Why do you want to use processes? And why keeping them live is not valid? I am trying to understand your constraints. Also, will you store the aggregate data somewhere to rebuild it again in case you need it again?
I would try Plan B only because it is simpler. Although you will indeed need something like LRU if you have bursts of load which cause too many aggregates to be in memory for those 5 minutes (albeit unlikely?).
It depends. On Plan A, if you are triggering the LRU eviction frequently, it will lead to word response times. Plan B should theoretically be fine: only the first load after every five minutes with no access will be a problem. If you are doing other things in your system, say background work, Plan B will help you release memory pressure when no aggregates are used. That’s why I suggest to start with Plan B and add Plan A if a timeout is not enough to control memory pressure.