websharks/quick-cache — pull request #364 by jaswsinc (2014-11-13 02:13:10+00:00)
Title: Adding new methods `\quick_cache\share\cache_lock()` and `\quick_cache\s...

Adding new methods `\quick_cache\share\cache_lock()` and `\quick_cache\share\cache_unlock()`. These take of advantage of semaphores for file locking (if possible) with a fallback on `flock()` when `sem_get()` is not possible or fails. These methods are blocking, making it so that cache writes (including clearing, purging, wiping) all gain an exclusive lock on the cache directory while work is underway. This prevents issues like we have seen on very busy sites, reported in: websharks/quick-cache#288