title: What is the performance impact of the touch command or its equivalent system call?
body: <p>In a custom-developed NodeJS web server (running on Linux) that can dynamically generate thumbnail images, I want to cache these thumbnails on the filesystem and keep track of when they are actually used. If they haven't been used for a certain period of time (say, one year), I'd consider them &quot;orphans&quot; and delete them.</p>
  <p>To this end, I considered to <code>touch</code> them each time they're requested from a client, so that I can use the modification time to check when they were last used.</p>
  <p>I assume this would incur a significant performance hit on the web server in high-load situations, as it is an &quot;unnecessary&quot; filesystem write, while, apart from logging, most requests will only consist of reads.</p>
  <p>Has anyone performed any benchmarks on how big an impact this might have and if it's worthwhile?</p>