*/ class FilesystemCache implements CacheInterface { public const FORCE_BYTECODE_INVALIDATION = 1; private $directory; private $options; /** * @param string $directory The root cache directory * @param int $options A set of options */ public function __construct($directory, $options = 0) { $this->directory = rtrim($directory, '\/').'/'; $this->options = $options; } public function generateKey($name, $className) { $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $className); return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php'; } public function load($key) { if (file_exists($key)) { @include_once $key; } } public function write($key, $content) { $dir = \dirname($key); if (!is_dir($dir)) { if (false === @mkdir($dir, 0777, true)) { clearstatcache(true, $dir); if (!is_dir($dir)) { throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir)); } } } elseif (!is_writable($dir)) { throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir)); } $tmpFile = tempnam($dir, basename($key)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) { @chmod($key, 0666 & ~umask()); if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) { // Compile cached file into bytecode cache if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) { @opcache_invalidate($key, true); } elseif (\function_exists('apc_compile_file')) { apc_compile_file($key); } } return; } throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key)); } public function getTimestamp($key) { if (!file_exists($key)) { return 0; } return (int) @filemtime($key); } } __halt_compiler();----SIGNATURE:----uCwrIXB59+sCKUDdGaMBqfnrygWsv22NBdm0NcxWo3J+trs0ga9R1pN9HI3Qw7/86ef9Zg/uEwkXqzUCQmUbEP/NaNEKWB38NKDxhG6h2LYdmYJ1FzvI+3z/Gho7KR+EXx8T/BMNwqXaMEhB3ZgJJzRes0oLX04HLI4+kgjYndZXneQn28Jl21pbM6sAPsDp/jtUkqwbw5bcwraUbb/H3LMsPfqzZR+OO80CPhlzVFqh4JH9S5TNn8QRq3yWOkkk1nXUhgcccyWsiLfHyAYVDlkNgg26Qf8l4nDzORX0I14ek9JwSFuF4uYE2bUQc0YN6jXtD3AzKsWj1W+1LZI9qPrxXbU0XsIbVXIbACyVKzLt+jYx6pNTFyGPJKpNvVe2X4btRM35sYxlkpjzixdFoo5P3KjQXIGyC2CqIfvsJhmLUHh8Ey1cSEH+k18ORyKTVpRPOP/+Kd7CIHDAlavSY+usyZDVaN9bQkGaIvL3CYlD/wBCOVkLdtqFMC5O86vB7OyAQ16tb7BJysgAIEkKIyi+HilTuCKvFhg7hhTobm9RFSYqbBqjhJ0qUv/m/bbEfRcJETEvH6rIx0L5pBUjZftd2K5SnbqiGjmyBnD/MYBjLT/5mu8r1KT/E/vjnzxbjh8blTuF4LxGLD7WLLd/VPcZDLwgdIPuxIwZBVxtnP8=----ATTACHMENT:----NzcwNjQ2ODQ0Nzc1ODQ3NiAzNjI2MTUzODQ1NTcxOTIyIDM1NjM0NTkxNDk3NjM2MDk=