- move caching to Smarty::_cache

This commit is contained in:
uwetews
2015-08-23 01:38:42 +02:00
parent 6a26393099
commit 87985d1243
11 changed files with 43 additions and 69 deletions
+2 -30
View File
@@ -570,20 +570,6 @@ class Smarty extends Smarty_Internal_TemplateBase
*/
public $default_config_type = 'file';
/**
* cached template objects
*
* @var array
*/
public $source_objects = array();
/**
* cached template objects
*
* @var array
*/
public $template_objects = array();
/**
* enable resource caching
*
@@ -633,13 +619,6 @@ class Smarty extends Smarty_Internal_TemplateBase
*/
public $registered_resources = array();
/**
* resource handler cache
*
* @var array
*/
public $_resource_handlers = array();
/**
* registered cache resources
*
@@ -647,13 +626,6 @@ class Smarty extends Smarty_Internal_TemplateBase
*/
public $registered_cache_resources = array();
/**
* cache resource handler cache
*
* @var array
*/
public $_cacheresource_handlers = array();
/**
* autoload filter
*
@@ -766,11 +738,11 @@ class Smarty extends Smarty_Internal_TemplateBase
public function templateExists($resource_name)
{
// create template object
$save = $this->template_objects;
$save = $this->_cache['template_objects'];
$tpl = new $this->template_class($resource_name, $this);
// check if it does exists
$result = $tpl->source->exists;
$this->template_objects = $save;
$this->_cache['template_objects'] = $save;
return $result;
}