Skip to content

Commit

Permalink
Remove use of CACHE constant in cache package.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 21, 2014
1 parent 82d7fe8 commit e2b5e62
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Cache/Engine/FileEngine.php
Expand Up @@ -46,7 +46,7 @@ class FileEngine extends CacheEngine {
* - `isWindows` Automatically populated with whether the host is windows or not
* - `lock` Used by FileCache. Should files be locked before writing to them?
* - `mask` The mask used for created files
* - `path` Path to where cachefiles should be saved.
* - `path` Path to where cachefiles should be saved. Defaults to system's temp dir.
* - `prefix` Prepended to all entries. Good for when you need to share a keyspace
* with either another cache config or another application.
* - `probability` Probability of hitting a cache gc cleanup. Setting to 0 will disable
Expand All @@ -61,7 +61,7 @@ class FileEngine extends CacheEngine {
'isWindows' => false,
'lock' => true,
'mask' => 0664,
'path' => CACHE,
'path' => null,
'prefix' => 'cake_',
'probability' => 100,
'serialize' => true
Expand All @@ -85,6 +85,9 @@ class FileEngine extends CacheEngine {
public function init(array $config = []) {
parent::init($config);

if ($this->_config['path'] === null) {
$this->_config['path'] = sys_get_temp_dir();
}
if (DS === '\\') {
$this->_config['isWindows'] = true;
}
Expand Down

0 comments on commit e2b5e62

Please sign in to comment.