Lines Matching refs:storageFile
35 private function isLocked($storageFile) { argument
37 return file_exists($storageFile . '.lock');
40 private function createLock($storageFile) { argument
41 $storageDir = dirname($storageFile);
52 @touch($storageFile . '.lock');
55 private function removeLock($storageFile) { argument
57 @unlink($storageFile . '.lock');
60 private function waitForLock($storageFile) { argument
70 } while ($cnt <= $tries && $this->isLocked($storageFile));
71 if ($this->isLocked($storageFile)) {
73 $this->removeLock($storageFile);
89 $storageFile = $this->getCacheFile(md5($key));
93 if ($this->isLocked($storageFile)) {
94 $this->waitForLock($storageFile);
96 if (file_exists($storageFile) && is_readable($storageFile)) {
98 …if (! $expiration || (($mtime = @filemtime($storageFile)) !== false && ($now - $mtime) < $expirati…
99 if (($data = @file_get_contents($storageFile)) !== false) {
110 $storageFile = $this->getCacheFile(md5($key));
111 if ($this->isLocked($storageFile)) {
113 $this->waitForLock($storageFile);
123 $this->createLock($storageFile);
124 if (! @file_put_contents($storageFile, $data)) {
125 $this->removeLock($storageFile);
128 $this->removeLock($storageFile);