◇ Single Template multi-cache: One template generates multiple cache files.
◇ the same template in use will generate a different page implementation, if the cache is turned on, then multiple instances generated through the same template need to be cached, which will cause problems.
◇ Solution--When invoking the display () method, provide only one in the second optional parameter, which is a unique identifier specified for each instance, and there are several cache pages for several different identifiers. For example:
$smarty display (' Index.tpl ',$_server[' Request_url ']);
◇ Local non-cache (3 methods): cache page can be cached all the page data, some of the data is not suitable for caching, such as weather information, user name information, etc., so you need to set "local not cache"
◇1, a single variable is not cached: {$title NoCache}, the variable {$title} is not cached
◇2, single variable not cached: $smarty-Assign (name, value, True)
◇3, a large number of variables are not cached: {NoCache} ... {/nocachae} where all the variables within the closing parentheses of {Nocachae} are not cached.
PHP Essay---smarty template engine single template multi-cache, local do not cache 20--21