How much unused RAM allocated to a Minecraft client or server is cached? [closed]
Not that I'm an expert in such things, but it sounds like you're conflating Windows memory caching and Java's memory management.
A program used frequently ends up getting pre-loaded into RAM by newer Windows systems. If it is needed elsewhere it is overwritten - that's pre-loading or 'caching'.
Java has what's called a "garbage collector" which cleans up unused memory every now and then whilst your program is running. Its not really important to know how it works as its more of a concern for developers - but suffice it to say its the thing that actually frees unused memory.
When running Minecraft from a command line, you set Java's min/Max allowable RAM usage with the parameters -Xms 512
(minimum 512mb) and -Xmx 1024
(Max 1gb). (Double clicking the icon uses the default values). What this means is that even if there's no chunks loaded and no one logged in, Java will reserve 512mb of RAM for Minecraft. It also means that if it reaches 1Gb of usage, you'll start experiencing lag and other slowdown effects as Java shuffles memory around.
So in summary, if you run Minecraft often, Windows will preload/cache the files used by it into RAM. Depending on your minimum RAM setting, Java will reserve that much memory for Minecraft.