mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '1.3' of git://github.com/cakephp/cakephp into 1.3
This commit is contained in:
commit
92c00e115e
5 changed files with 8 additions and 4 deletions
|
@ -297,6 +297,7 @@
|
||||||
* '127.0.0.1:11211' // localhost, default port 11211
|
* '127.0.0.1:11211' // localhost, default port 11211
|
||||||
* ), //[optional]
|
* ), //[optional]
|
||||||
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
||||||
|
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
||||||
* ));
|
* ));
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -297,6 +297,7 @@
|
||||||
* '127.0.0.1:11211' // localhost, default port 11211
|
* '127.0.0.1:11211' // localhost, default port 11211
|
||||||
* ), //[optional]
|
* ), //[optional]
|
||||||
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
||||||
|
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
||||||
* ));
|
* ));
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
5
cake/libs/cache/memcache.php
vendored
5
cake/libs/cache/memcache.php
vendored
|
@ -67,7 +67,8 @@ class MemcacheEngine extends CacheEngine {
|
||||||
'engine'=> 'Memcache',
|
'engine'=> 'Memcache',
|
||||||
'prefix' => Inflector::slug(APP_DIR) . '_',
|
'prefix' => Inflector::slug(APP_DIR) . '_',
|
||||||
'servers' => array('127.0.0.1'),
|
'servers' => array('127.0.0.1'),
|
||||||
'compress'=> false
|
'compress'=> false,
|
||||||
|
'persistent' => true
|
||||||
), $settings)
|
), $settings)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -82,7 +83,7 @@ class MemcacheEngine extends CacheEngine {
|
||||||
$this->__Memcache =& new Memcache();
|
$this->__Memcache =& new Memcache();
|
||||||
foreach ($this->settings['servers'] as $server) {
|
foreach ($this->settings['servers'] as $server) {
|
||||||
list($host, $port) = $this->_parseServerString($server);
|
list($host, $port) = $this->_parseServerString($server);
|
||||||
if ($this->__Memcache->addServer($host, $port)) {
|
if ($this->__Memcache->addServer($host, $port, $this->settings['persistent'])) {
|
||||||
$return = true;
|
$return = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,7 +489,7 @@ class View extends Object {
|
||||||
$this->output = $this->_render($layoutFileName, $dataForLayout, $loadHelpers, true);
|
$this->output = $this->_render($layoutFileName, $dataForLayout, $loadHelpers, true);
|
||||||
|
|
||||||
if ($this->output === false) {
|
if ($this->output === false) {
|
||||||
$this->output = $this->_render($layoutFileName, $data_for_layout);
|
$this->output = $this->_render($layoutFileName, $dataForLayout);
|
||||||
trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layoutFileName, $this->output), E_USER_ERROR);
|
trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layoutFileName, $this->output), E_USER_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,8 @@ class MemcacheEngineTest extends CakeTestCase {
|
||||||
'probability' => 100,
|
'probability' => 100,
|
||||||
'servers' => array('127.0.0.1'),
|
'servers' => array('127.0.0.1'),
|
||||||
'compress' => false,
|
'compress' => false,
|
||||||
'engine' => 'Memcache'
|
'engine' => 'Memcache',
|
||||||
|
'persistent' => true,
|
||||||
);
|
);
|
||||||
$this->assertEqual($settings, $expecting);
|
$this->assertEqual($settings, $expecting);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue