I was looking at this other question:
which tells me how stuff works, but doesn't really give any solution. How would I get the time which a directory was last modified? I would be using this time to determine whether i need to clear a cache, whose contents are calculated from the contents of the directory.
One alternative would be to recurse through every file and subfolder, but that would probably completely negate any benefits of caching in the first place. As far as I can tell, the "mtime" and other metadata for files/folders are cached somewhere and do not actually require a file-read every time you want to check (which is the reason why checking mtime on every memcached file is still much faster than loading the files themselves, even when the files are tiny).
So... is there any nice, fast way of getting the last-modified timestamp of an entire directory?