Will setting a file's modification time to the future with touch() work accross the board?
<p>I have a caching class that has a flat file driver, meaning you can cache arbitrary data to a flat file using a key and expiration time, then retrieve this data using the same key.</p>

<p>Expire duration must be set with the setCache method in order to work with other drivers (as opposed to having an expiration duration argument on the getCache method, even though this would make determining whether the cache has expired much easier, as I could just compare it to the files last modification time).</p>

<p>Currently I prepend a timestamp (+ expire duration) to the beginning of the file. When a user tries to getCache related to that file, the method opens the file and strips off the first line to get this timestamp. It then uses that timestamp to figure out whether or not that cache has expired. This is not very efficient obviously.</p>

<p>I recently came accross a PHP function touch(), which allows me to set a file's last modification time to an arbitrary value. This sounds awesome because it would allow me to (instead of the above mentioned method of figuring out if the cache has expired), set the file's last modification time to some point in the future. I can then check this time to see if the cache has expired yet.</p>

<p>I really REALLY want to be able to use this. My application is distributed however, and since this function works with the environment, I am not sure if I should trust this function to work as expected accross the board on different systems. Does anyone have any information or resources about the compatability of this function?</p>
