|
|
@@ -225,7 +225,7 @@ class View implements EventDispatcherInterface
|
|
|
* @var string
|
|
|
* @see \Cake\View\View::element()
|
|
|
*/
|
|
|
- public $elementCache = 'default';
|
|
|
+ protected $elementCache = 'default';
|
|
|
|
|
|
/**
|
|
|
* List of variables to collect from the associated controller.
|
|
|
@@ -1267,6 +1267,7 @@ class View implements EventDispatcherInterface
|
|
|
'request' => 'setRequest',
|
|
|
'response' => 'setResponse',
|
|
|
'subDir' => 'setSubDir',
|
|
|
+ 'elementCache' => 'setElementCache',
|
|
|
];
|
|
|
if (isset($protected[$name])) {
|
|
|
$method = $protected[$name];
|
|
|
@@ -1432,6 +1433,20 @@ class View implements EventDispatcherInterface
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Set The cache configuration View will use to store cached elements
|
|
|
+ *
|
|
|
+ * @param string $elementCache Cache config name.
|
|
|
+ * @return $this
|
|
|
+ * @see \Cake\View\View::$elementCache
|
|
|
+ */
|
|
|
+ public function setElementCache($elementCache)
|
|
|
+ {
|
|
|
+ $this->elementCache = $elementCache;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Returns filename of given action's template file (.ctp) as a string.
|
|
|
* CamelCased action names will be under_scored by default.
|
|
|
* This means that you can have LongActionNames that refer to
|