I actually do this with NixOS impermanence lol. The things I need are symlinked from a different partition and the stuff I don't need automatically gets wiped clean.
You've clearly never lived with a cat. Your metaphor is crushed by the Kitty Expansion Theory: No piece of furniture is large enough for a cat and any other additional being.
Exactly. That kitty encompasses and rules over aaaalllll that couch. Surfaces and interior volume (as soon as he discovers it). No room for anybody else. Just ask him.
The kitty expansion theory is incomplete, any piece of furniture is large enough for both a cat and an additional being provided the additional being was there first
Much like a cat can stretch out and somehow occupy an entire queen-sized bed, Linux will happily cache your file system as long as there is available memory.
Note for the "unused RAM is wasted RAM" people, in the description of earlyoom:
Why is "available" memory checked as opposed to "free" memory? On a healthy Linux system, "free" memory is supposed to be close to zero, because Linux uses all available physical memory to cache disk access. These caches can be dropped any time the memory is needed for something else.
I was running out of RAM on my 16GB system for years (just doing normal work tasks), so I finally upgraded to a new laptop with 64GB of RAM. Now I never run out of memory.
It's great that the system is so efficient. But things do come up. I once worked with an LSP server that was so hungry that I had to upgrade from 32 to 64gb to stop the OOM crashes. (Tbf I only ran out of memory when running the LSP server and compiler at the same time - but hey, I have work to do!) But now since I'm working in a different area I'm just way over-RAMed.