Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 92c00e115eedb424784bef612ea0122848e32dc0 2 parents 5c18571 + 9b93393
ceeram ceeram authored
1  app/config/core.php
@@ -297,6 +297,7 @@
297 297 * '127.0.0.1:11211' // localhost, default port 11211
298 298 * ), //[optional]
299 299 * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
  300 + * 'persistent' => true, // [optional] set this to false for non-persistent connections
300 301 * ));
301 302 *
302 303 */
1  cake/console/templates/skel/config/core.php
@@ -297,6 +297,7 @@
297 297 * '127.0.0.1:11211' // localhost, default port 11211
298 298 * ), //[optional]
299 299 * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
  300 + * 'persistent' => true, // [optional] set this to false for non-persistent connections
300 301 * ));
301 302 *
302 303 */
5 cake/libs/cache/memcache.php
@@ -67,7 +67,8 @@ function init($settings = array()) {
67 67 'engine'=> 'Memcache',
68 68 'prefix' => Inflector::slug(APP_DIR) . '_',
69 69 'servers' => array('127.0.0.1'),
70   - 'compress'=> false
  70 + 'compress'=> false,
  71 + 'persistent' => true
71 72 ), $settings)
72 73 );
73 74
@@ -82,7 +83,7 @@ function init($settings = array()) {
82 83 $this->__Memcache =& new Memcache();
83 84 foreach ($this->settings['servers'] as $server) {
84 85 list($host, $port) = $this->_parseServerString($server);
85   - if ($this->__Memcache->addServer($host, $port)) {
  86 + if ($this->__Memcache->addServer($host, $port, $this->settings['persistent'])) {
86 87 $return = true;
87 88 }
88 89 }
2  cake/libs/view/view.php
@@ -489,7 +489,7 @@ function renderLayout($content_for_layout, $layout = null) {
489 489 $this->output = $this->_render($layoutFileName, $dataForLayout, $loadHelpers, true);
490 490
491 491 if ($this->output === false) {
492   - $this->output = $this->_render($layoutFileName, $data_for_layout);
  492 + $this->output = $this->_render($layoutFileName, $dataForLayout);
493 493 trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layoutFileName, $this->output), E_USER_ERROR);
494 494 return false;
495 495 }
3  cake/tests/cases/libs/cache/memcache.test.php
@@ -106,7 +106,8 @@ function testSettings() {
106 106 'probability' => 100,
107 107 'servers' => array('127.0.0.1'),
108 108 'compress' => false,
109   - 'engine' => 'Memcache'
  109 + 'engine' => 'Memcache',
  110 + 'persistent' => true,
110 111 );
111 112 $this->assertEqual($settings, $expecting);
112 113 }

0 comments on commit 92c00e1

Please sign in to comment.
Something went wrong with that request. Please try again.