Skip to content
Permalink
Browse files

Removing magic cache prefix as APP_DIR is always src

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 948cfc0053676dfc599499844de345110084637a
@@ -16,7 +16,6 @@
use APCIterator;
use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;
/**
* APC storage engine for cache
@@ -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');
}
@@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;
use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;
use InvalidArgumentException;
use Memcached;
@@ -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,
@@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;
use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;
/**
* Wincache storage engine for cache
@@ -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');
}
@@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;
use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;
/**
* Xcache storage engine for cache
@@ -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');
}

0 comments on commit 948cfc0

Please sign in to comment.
You can’t perform that action at this time.