Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Problem to clean up compiled tpl with 3.1.24
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Jun 04, 2015 12:03 am    Post subject: Reply with quote

If you call clearCompiledTemplate() for a single template name you must set up the corresponding compile_id as you have done now.
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Wed Sep 09, 2015 6:25 am    Post subject: Reply with quote

Hello,

For information I know now what was my problem with clearing templates.

opcache is activated for php on my server and when I disable it everything is working fine but not when it is disabled.

Yesterday I enable opcache.revalidate_path which is disabled by default and it seems that now it is ok with opcache. Let's see

Others experience on this?
_________________
http://www.letsGarden.info
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Sep 12, 2015 8:40 pm    Post subject: Reply with quote

Depending of the Opcache configuration it may not check for file modifications and removals.

See http://php.net/manual/de/opcache.configuration.php

Did you enable opcache.validate_timestamps?
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Sun Sep 13, 2015 9:49 am    Post subject: Reply with quote

Hello,

Hereafter my current configuration in php.ini (for now all seems ok)

Code:
opcache.memory_consumption=2048
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=100000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=0
opcache.max_wasted_percentage=10

opcache.enable=1
opcache.revalidate_path=1


Regarding opcache.validate_timestamps, the default value is "1" so it is enable
_________________
http://www.letsGarden.info
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun Sep 13, 2015 10:50 am    Post subject: Reply with quote

Code:
opcache.revalidate_freq=60


Will check timestamps every minute. You may see recompiled templates and update cache files with a larger delay.

Starting withe the upcoming version 3.1.28 Smarty will invalidate and deleted files automatically. So validation should not be necessary any longer at all.

For the time being the default value of
Code:
opcache.revalidate_freq=2


might be better.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Sep 14, 2015 10:32 pm    Post subject: Reply with quote

The fix is now already on github in the master branch.

It should work now independent from any OPCACHE settings.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP