I've had this same problem and it's really annoying. The best "solution" I've found is to close After Effects, open Activity monitor and force quit all of the aeselflink processes, then restart After Effects. I've also had a little luck with force quitting the aeselflink processes while I'm in After Effects, purging all memory, then trying the RAM preview again.
I had a similar situation with the ram preview cache not being retained in certain circumstances.
With a single Prores 4444 layer things worked as expected.
But when there were multiple layers of Prores 4444 the cache was not retained and subsequent RAM previews required re-rendering.
One work-around is to precomp the footage. RAM preview and subsequent previews then worked as expected.
I demonstrated the situation in a video -
Show a screenshot of your Memory & Multiprocessing preferences.
Start by increasing the RAM reserved for other applications to be much higher... like 25% of your total RAM (16GB in your case). See this:
I have tried those tips before. Unfortunately, I haven't had great success with them in this case.
When I reserve the 16GB of RAM for other apps and RAM preview a comp containing multiple Prores 4444 footage layers, it plays back and retains the cache as expected. However, the 2nd RAM preview of another comp in the same project containing multiple Prores 4444 footage layers stays stuck in "Initializing Background Processes." A check with Activity Monitor usually shows aeselflink processes that are hung up.
This has been my experience until I came upon the work-around of precomping Prores files.
To demonstrate, here's a screen shot of the stuck process with the memory settings I used -
I rebooted the system and tried 2 more times with the same result.
If I simply precomp the Prores 4444 footage layers as demonstrated in the video, I get smooth RAM preview caching and performance. This works even if I allocated less RAM to other applications in the Memory and Multiprocessing preferences (hence the 6GB setting from earlier). With the work-around, AE runs smooth with no hiccups and RAM previews behave as expected.