|
|
@@ -45,16 +45,17 @@ class XcacheEngine extends CacheEngine {
|
|
|
* @return boolean True if the engine has been successfully initialized, false if not
|
|
|
*/
|
|
|
public function init($settings = array()) {
|
|
|
- if (!isset($settings['prefix'])) {
|
|
|
- $settings['prefix'] = Inflector::slug(APP_DIR) . '_';
|
|
|
+ if (php_sapi_name() !== 'cli') {
|
|
|
+ parent::init(array_merge(array(
|
|
|
+ 'engine' => 'Xcache',
|
|
|
+ 'prefix' => Inflector::slug(APP_DIR) . '_',
|
|
|
+ 'PHP_AUTH_USER' => 'user',
|
|
|
+ 'PHP_AUTH_PW' => 'password'
|
|
|
+ ), $settings)
|
|
|
+ );
|
|
|
+ return function_exists('xcache_info');
|
|
|
}
|
|
|
- $settings += array(
|
|
|
- 'engine' => 'Xcache',
|
|
|
- 'PHP_AUTH_USER' => 'user',
|
|
|
- 'PHP_AUTH_PW' => 'password'
|
|
|
- );
|
|
|
- parent::init($settings);
|
|
|
- return function_exists('xcache_info');
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
/**
|