Merge branch '1.3' of git://github.com/cakephp/cakephp into 1.3

This commit is contained in:
Ceeram 2011-05-18 10:17:44 +02:00
commit 92c00e115e
5 changed files with 8 additions and 4 deletions

View file

@ -297,6 +297,7 @@
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* 'persistent' => true, // [optional] set this to false for non-persistent connections
* ));
*
*/

View file

@ -297,6 +297,7 @@
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* 'persistent' => true, // [optional] set this to false for non-persistent connections
* ));
*
*/

View file

@ -67,7 +67,8 @@ class MemcacheEngine extends CacheEngine {
'engine'=> 'Memcache',
'prefix' => Inflector::slug(APP_DIR) . '_',
'servers' => array('127.0.0.1'),
'compress'=> false
'compress'=> false,
'persistent' => true
), $settings)
);
@ -82,7 +83,7 @@ class MemcacheEngine extends CacheEngine {
$this->__Memcache =& new Memcache();
foreach ($this->settings['servers'] as $server) {
list($host, $port) = $this->_parseServerString($server);
if ($this->__Memcache->addServer($host, $port)) {
if ($this->__Memcache->addServer($host, $port, $this->settings['persistent'])) {
$return = true;
}
}

View file

@ -489,7 +489,7 @@ class View extends Object {
$this->output = $this->_render($layoutFileName, $dataForLayout, $loadHelpers, true);
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);
return false;
}

View file

@ -106,7 +106,8 @@ class MemcacheEngineTest extends CakeTestCase {
'probability' => 100,
'servers' => array('127.0.0.1'),
'compress' => false,
'engine' => 'Memcache'
'engine' => 'Memcache',
'persistent' => true,
);
$this->assertEqual($settings, $expecting);
}