- Replaced underscores in file path caching with a tilde instead.

This commit is contained in:
Dave Mc Nicoll committed 2019-12-19 09:53:15 -05:00
1 parent 0ce9955631
commit 079d8b058d
3 files changed
+57 -4

No files matched your search

+2 -2
View File
@@ -54,7 +54,7 @@ class Opcache implements Cache {
}
if ( file_exists($path = $this->cachePath($viewPath)) ) {
$this->compiled[$viewPath] = require_once($path);
$this->compiled[$viewPath] = include($path);
return true;
}
@@ -82,6 +82,6 @@ class Opcache implements Cache {
protected function cachePath(string $fileName = "") : string
{
return implode(DIRECTORY_SEPARATOR, array_filter([ $this->cachePath, $this->cacheFolder, $fileName ? str_replace([ "/", DIRECTORY_SEPARATOR ], "_", $fileName . ".php") : null ]));
return implode(DIRECTORY_SEPARATOR, array_filter([ $this->cachePath, $this->cacheFolder, $fileName ? str_replace([ "/", DIRECTORY_SEPARATOR ], "~", $fileName . ".php") : null ]));
}
}