According to this Mozilla Knowledge Base Article Firefox already does (or can) cache images in memory. The gist of it:
This preference controls the maximum amount of memory to use for caching decoded images and chrome (application user interface elements).
I wonder if the claimed 20% is the result of testing the technique, or just "There! - that otta fly." You could be the one to do the science. But consider: A RAM disk takes memory from all tasks including the OS. Firefox's RAM caching only takes the memory FF needs, while it needs it. It might be fun and instructive to plan a test and run it though. I hope you'll report back if you do it.
Edit: I missed that the OP asked about Chrome, as Daniel Beck points out. I'm leaving the answer up for the comments about RAM disks (grawity's counter-example notwithstanding. But thanks for the tip, grawity - I hadn't known that). Also anyone searching for similar information about Firefox someday.