cache in windows file

pull/128/head
qkqpttgf 2020-08-18 15:48:32 +08:00 committed by GitHub
parent cfda210fdc
commit 3a95027a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -563,6 +563,10 @@ function filecache()
}
$tag = __DIR__ . '/OneManager/' . $_SERVER['disktag'];
while (strpos($tag, '/')>-1) $tag = str_replace('/', '_', $tag);
if (strpos($tag, ':')>-1) {
while (strpos($tag, ':')>-1) $tag = str_replace(':', '_', $tag);
while (strpos($tag, '\\')>-1) $tag = str_replace('\\', '_', $tag);
}
// error_log('DIR:' . $dir . ' TAG: ' . $tag);
$cache = new \Doctrine\Common\Cache\FilesystemCache($dir, $tag);
return $cache;