1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/12620] Uses a cache directory per environment

PHPBB3-12620
This commit is contained in:
Tristan Darricau
2014-09-29 16:06:56 +02:00
parent 998b4baa71
commit aa061aa7c9
4 changed files with 69 additions and 41 deletions

View File

@@ -28,7 +28,12 @@ class file extends \phpbb\cache\driver\base
function __construct($cache_dir = null)
{
global $phpbb_root_path;
$this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/';
$this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/';
if (!is_dir($this->cache_dir))
{
@mkdir($this->cache_dir, 0777, true);
}
}
/**