Smarty in the setting off the cache can not be specified in the file with the cache?
Did a small function, Online_count (), show the number of online, intermediate technology does not say, because this is a small project used, accuracy requirements are not high, but must be shown
$smarty-Assign ("Online_count", Online_count ());
I don't want to check on this statistic. function Online_count () for online numbers;
In config, you have set the
My config.php.
$smarty = new Smarty ();
//....... Skip Over
Number of people online
$smarty-Assign ("Online_count", Online_count ());
Is it possible to set the Online_count variable to cache?
Why do you put this on config.php assignment?
Because my online number is displayed in the header and the header does not have PHP, only the template, and there is no PHP $smarty-and display () This header.html templates
Are all introduced in other templates {include file= "common/header.html"}
Excuse me, what else is the method?
Ignore this online number to cache up the request is unreasonable, on the technical level can have what method to solve?
------to solve the idea----------------------
You can do the cache in Online_count this function.