Re:Linux Kernel: The multi-generational LRU
by k_bx on Monday April 19, 2021 @05:32AM
(#26860733)
What I would love to see is an expiration mechanism for files, e.g. you create a file that will get cleaned up in an hour. Would simplify my life on multiple occasions.
[ Parent
| on HN ]
You can with systemd (*cue boos from the audience*), although it involves a bit of additional configuration - what files to clean up, and set up a timer.
See e.g. https://www.putorius.net/systemd-tmpfiles.html#user-specific... (no affiliation with the site, it was just the first one I found that describes the works).
Wow, thank you! I didn't know it not only exists but is provided by systemd. I'm already using systemd to deploy my services, so this sounds like a perfect fit!
Re:Linux Kernel: The multi-generational LRU
by loa_in_ on Monday April 19, 2021 @08:22AM
(#26861920)
That isn't something kernel should concern itself with. It also can be accomplished by three line python script and one line of crontab
To me, this is the same concern that tmpfile api is providing. Either remove the temp file/dir api or extend it with useful stuff.