Skip to content

Commit

Permalink
Removing magic cache prefix as APP_DIR is always src
Browse files Browse the repository at this point in the history
This is a problem better solved with docs and defaults in the app repo
  • Loading branch information
lorenzo committed Sep 25, 2014
1 parent 00deb7c commit 948cfc0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions src/Cache/Engine/ApcEngine.php
Expand Up @@ -16,7 +16,6 @@

use APCIterator;
use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;

/**
* APC storage engine for cache
Expand All @@ -41,9 +40,6 @@ class ApcEngine extends CacheEngine {
* @return bool True if the engine has been successfully initialized, false if not
*/
public function init(array $config = []) {
if (!isset($config['prefix'])) {
$config['prefix'] = Inflector::slug(APP_DIR) . '_';
}
parent::init($config);
return function_exists('apc_dec');
}
Expand Down
5 changes: 0 additions & 5 deletions src/Cache/Engine/MemcachedEngine.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;

use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;
use InvalidArgumentException;
use Memcached;

Expand Down Expand Up @@ -102,10 +101,6 @@ public function init(array $config = []) {
return false;
}

if (!isset($config['prefix'])) {
$config['prefix'] = Inflector::slug(APP_DIR) . '_';
}

$this->_serializers = [
'igbinary' => Memcached::SERIALIZER_IGBINARY,
'json' => Memcached::SERIALIZER_JSON,
Expand Down
4 changes: 0 additions & 4 deletions src/Cache/Engine/WincacheEngine.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;

use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;

/**
* Wincache storage engine for cache
Expand All @@ -41,9 +40,6 @@ class WincacheEngine extends CacheEngine {
* @return bool True if the engine has been successfully initialized, false if not
*/
public function init(array $config = []) {
if (!isset($config['prefix'])) {
$config['prefix'] = Inflector::slug(APP_DIR) . '_';
}
parent::init($config);
return function_exists('wincache_ucache_info');
}
Expand Down
4 changes: 0 additions & 4 deletions src/Cache/Engine/XcacheEngine.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;

use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;

/**
* Xcache storage engine for cache
Expand Down Expand Up @@ -58,9 +57,6 @@ class XcacheEngine extends CacheEngine {
*/
public function init(array $config = []) {
if (php_sapi_name() !== 'cli') {
if (!isset($config['prefix'])) {
$config['prefix'] = Inflector::slug(APP_DIR) . '_';
}
parent::init($config);
return function_exists('xcache_info');
}
Expand Down

0 comments on commit 948cfc0

Please sign in to comment.