mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-12 01:49:53 +01:00
Simplified the (no)caching architecture by:
- removing support for $cache_attrs for registered plugins,
- removing the undocumented {make_nocache} tag and the deprecated {insert} tag and associated code
- removing support for a compile_id property on include tags.
Fixes a bug in extends: resources by propagating the nocache-hashes between a master template and it's subtemplates in \Smarty\Template::_subTemplateRender. This might need further improvement.
This commit is contained in:
@@ -46,9 +46,8 @@ class BCPluginsAdapter extends Base {
|
||||
}
|
||||
$callback = $plugin[0];
|
||||
$cacheable = (bool) $plugin[1] ?? true;
|
||||
$cache_attributes = (array) $plugin[2] ?? [];
|
||||
|
||||
return new FunctionPluginWrapper($callback, $cacheable, $cache_attributes);
|
||||
return new FunctionPluginWrapper($callback, $cacheable);
|
||||
|
||||
}
|
||||
|
||||
@@ -167,7 +166,6 @@ class BCPluginsAdapter extends Base {
|
||||
'prefilter',
|
||||
'postfilter',
|
||||
'outputfilter',
|
||||
'insert',
|
||||
] as $type) {
|
||||
foreach (glob($path . $type . '.?*.php') as $filename) {
|
||||
$pluginName = $this->getPluginNameFromFilename($filename);
|
||||
|
||||
@@ -34,10 +34,8 @@ class CoreExtension extends Base {
|
||||
case 'elseif': return new \Smarty\Compile\Tag\ElseIfTag();
|
||||
case 'ifclose': return new \Smarty\Compile\Tag\IfClose();
|
||||
case 'include': return new \Smarty\Compile\Tag\IncludeTag();
|
||||
case 'insert': return new \Smarty\Compile\Inser();
|
||||
case 'ldelim': return new \Smarty\Compile\Tag\Ldelim();
|
||||
case 'rdelim': return new \Smarty\Compile\Tag\Rdelim();
|
||||
case 'make_nocache': return new \Smarty\Compile\Tag\MakeNocache();
|
||||
case 'nocache': return new \Smarty\Compile\Tag\Nocache();
|
||||
case 'nocacheclose': return new \Smarty\Compile\Tag\NocacheClose();
|
||||
case 'parent': return new \Smarty\Compile\Tag\ParentTag();
|
||||
|
||||
Reference in New Issue
Block a user