mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- new feature If ACP is enabled force an apc_compile_file() when compiled or cached template was updated
This commit is contained in:
@@ -14,6 +14,10 @@ Smarty 3.1.30
|
|||||||
The content of the compiled template may depend on the template_dir search order
|
The content of the compiled template may depend on the template_dir search order
|
||||||
{include .... inline} is used or $smarty->merge_compiled_includes is enabled
|
{include .... inline} is used or $smarty->merge_compiled_includes is enabled
|
||||||
|
|
||||||
|
ACP
|
||||||
|
===
|
||||||
|
If ACP is enabled force an apc_compile_file() when compiled or cached template was updated
|
||||||
|
|
||||||
Smarty 3.1.28
|
Smarty 3.1.28
|
||||||
|
|
||||||
OPCACHE
|
OPCACHE
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
25.12.2015
|
25.12.2015
|
||||||
- compile {block} tag code and its processing into classes
|
- compile {block} tag code and its processing into classes
|
||||||
- optimization replace hhvm extension by inline code
|
- optimization replace hhvm extension by inline code
|
||||||
|
- new feature If ACP is enabled force an apc_compile_file() when compiled or cached template was updated
|
||||||
|
|
||||||
|
|
||||||
24.12.2015
|
24.12.2015
|
||||||
- new feature Compiler does now observe the template_dir setting and will create separate compiled files if required
|
- new feature Compiler does now observe the template_dir setting and will create separate compiled files if required
|
||||||
|
@@ -117,7 +117,9 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
|||||||
{
|
{
|
||||||
if ($_template->smarty->ext->_writeFile->writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
|
if ($_template->smarty->ext->_writeFile->writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
|
||||||
if (function_exists('opcache_invalidate')) {
|
if (function_exists('opcache_invalidate')) {
|
||||||
opcache_invalidate($_template->cached->filepath);
|
opcache_invalidate($_template->cached->filepath, true);
|
||||||
|
} elseif (function_exists('apc_compile_file')) {
|
||||||
|
apc_compile_file($_template->cached->filepath);
|
||||||
}
|
}
|
||||||
$cached = $_template->cached;
|
$cached = $_template->cached;
|
||||||
$cached->timestamp = $cached->exists = is_file($cached->filepath);
|
$cached->timestamp = $cached->exists = is_file($cached->filepath);
|
||||||
|
@@ -165,7 +165,9 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
|
|||||||
private function loadCompiledTemplate(Smarty_Internal_Template $_template)
|
private function loadCompiledTemplate(Smarty_Internal_Template $_template)
|
||||||
{
|
{
|
||||||
if (function_exists('opcache_invalidate')) {
|
if (function_exists('opcache_invalidate')) {
|
||||||
opcache_invalidate($_template->compiled->filepath);
|
opcache_invalidate($_template->compiled->filepath, true);
|
||||||
|
} elseif (function_exists('apc_compile_file')) {
|
||||||
|
apc_compile_file($_template->compiled->filepath);
|
||||||
}
|
}
|
||||||
$_smarty_tpl = $_template;
|
$_smarty_tpl = $_template;
|
||||||
if (defined('HHVM_VERSION')) {
|
if (defined('HHVM_VERSION')) {
|
||||||
|
Reference in New Issue
Block a user