added static php-crud-api
This commit is contained in:
@@ -86,9 +86,6 @@ class TempFileCache implements Cache
|
||||
if ($data === false) {
|
||||
return '';
|
||||
}
|
||||
if (strpos($data, '|') === false) {
|
||||
return '';
|
||||
}
|
||||
list($ttl, $string) = explode('|', $data, 2);
|
||||
if ($ttl > 0 && time() - filemtime($filename) > $ttl) {
|
||||
return '';
|
||||
@@ -121,18 +118,18 @@ class TempFileCache implements Cache
|
||||
if (strlen($entry) != $len) {
|
||||
continue;
|
||||
}
|
||||
if (file_exists($filename) && is_file($filename)) {
|
||||
if (is_file($filename)) {
|
||||
if ($all || $this->getString($filename) == null) {
|
||||
@unlink($filename);
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (strlen($entry) != $segments[0]) {
|
||||
continue;
|
||||
}
|
||||
if (file_exists($filename) && is_dir($filename)) {
|
||||
if (is_dir($filename)) {
|
||||
$this->clean($filename, array_slice($segments, 1), $len - $segments[0], $all);
|
||||
@rmdir($filename);
|
||||
rmdir($filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user