I have a directory that contains a bunch of files that represent a file cache. I would like to deploy my code to a web server, but I havent made the code thread safe.
I have read about flock, and pretty much just want confirmation or a better way of doing things.
I would like to lock the directory when i update the file cache. How can I do this?