Thats not really how or why caching works - caching is meant to take advantage of the faster speed and better random access of the SSD or other memory, rather than minimising writes to the hdd. Caching is designed to maximise speed, not reduce write, by having a smaller, faster buffer backing a large, slow storage device.
In fact, bcache, which is part of the mainline linux kernel, will simply pass on sequential writes to the hdd, rather than passing it through the SSD since there's no performance advantage.
ZIL/L2Arc uses the SSD to store logs (in the case of ZIL) and commonly used file clusters (with L2Arc). ZIL speeds up synchronous writes by storing them till they're all ready to be written. L2Arc stores commonly accessed files on faster storage. Neither of these will let you do what you need.
Fusion drive also uses a SSD and a HDD transparently putting commonly used files on the SSD for faster reads, and HDDs for bulk storage of less often used files. It too doesn't let you use the SSD as scratch space, and back up files to the main drive every so often
What you're looking at isn't caching at all, but rather periodic backups of the system to the HDD. I'm guessing ou might be able to fudge something together with Aufs -the first branch on the HDD with larger files (so it takes precidence), and a branch on the SSD, then run a script that moves files from the SSD to the HDD periodically, while having it accessable from the same location. I've not tested this out yet, but unlike caching, periodically moving files and using aufs will likely be exactly what you want.
The simplest way to sort files by age is ls -tr - t sorts by time (newest to oldest) and r reverses the order. (If you have a specific range in mind find . -mtime n
works great n as a specific number gives you files modified n days ago, -n gives you files modified in the last n days and + n gives you files modified n days ago). You can find some ideas on how to use it here
Since quietness is your real goal, you can check if your drive supports silent mode with hdparm -M /dev/sda
- this should output something like acoustic = 254 (128=quiet ... 254=fast)
, in which case you can make your hard drive quieter with the command hdparm -M 128 /dev/sda
. Run the opposite command hdparm -M 1254 /dev/sda
when you need more speed.