switched Doctrine cache to use new stream locator for directory and moved to sub folder

This commit is contained in:
Andy Miller
2014-10-09 14:53:37 -06:00
parent a69e5fa115
commit e224841650
2 changed files with 6 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ define('USER_PATH', 'user/');
define('USER_DIR', ROOT_DIR . USER_PATH);
define('SYSTEM_DIR', ROOT_DIR .'system/');
define('ASSETS_DIR', ROOT_DIR . 'assets/');
define('CACHE_DIR', ROOT_DIR .'cache/');
define('CACHE_DIR', ROOT_DIR . 'cache/');
define('IMAGES_DIR', ROOT_DIR . 'images/');
define('LOG_DIR', ROOT_DIR .'logs/');
define('VENDOR_DIR', ROOT_DIR .'vendor/');

View File

@@ -35,6 +35,8 @@ class Cache extends Getters
*/
protected $enabled;
protected $cache_dir;
/**
* Constructor
*
@@ -56,6 +58,8 @@ class Cache extends Getters
/** @var Config $config */
$this->config = $grav['config'];
$this->cache_dir = $grav['locator']->findResource('cache://doctrine', true, true);
/** @var Uri $uri */
$uri = $grav['uri'];
@@ -118,7 +122,7 @@ class Cache extends Getters
break;
default:
$driver = new \Doctrine\Common\Cache\FilesystemCache(CACHE_DIR);
$driver = new \Doctrine\Common\Cache\FilesystemCache($this->cache_dir);
break;
}