This commit is contained in:
didou
2004-04-13 12:14:17 +00:00
parent e066cf2984
commit af45ae6f07
4 changed files with 184 additions and 178 deletions

View File

@@ -27,7 +27,7 @@ $smarty->clear_cache(null,"sports");
$smarty->display('index.tpl',"sports|basketball");
?>
]]>
</programlisting>
</programlisting>
</example>
<note>
<title>Technical Note</title>
@@ -40,7 +40,9 @@ $smarty->display('index.tpl',"sports|basketball");
caches for the blue theme with clear_cache(null,'themes|blue');
</para>
</note>
</sect1>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -24,7 +24,7 @@ $my_cache_id = $_GET['article_id'];
$smarty->display('index.tpl',$my_cache_id);
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
Above, we are passing the variable $my_cache_id to display() as the
@@ -73,7 +73,7 @@ if(!$smarty->is_cached('index.tpl',$my_cache_id)) {
$smarty->display('index.tpl',$my_cache_id);
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
You can clear all caches for a particular cache_id by passing null as the
@@ -95,13 +95,15 @@ $smarty->clear_cache(null,"sports");
$smarty->display('index.tpl',"sports");
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
In this manner, you can "group" your caches together by giving them the
same cache_id.
</para>
</sect1>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -70,7 +70,7 @@ $smarty->cache_lifetime = 30; // 30 seconds
$smarty->display('home.tpl');
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
If <link linkend="variable.compile.check">$compile_check</link> is enabled,
@@ -93,7 +93,7 @@ $smarty->compile_check = true;
$smarty->display('index.tpl');
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
If <link linkend="variable.force.compile">$force_compile</link> is enabled,
@@ -127,7 +127,7 @@ if(!$smarty->is_cached('index.tpl')) {
$smarty->display('index.tpl');
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
You can keep parts of a page dynamic with the <link
@@ -163,9 +163,11 @@ $smarty->clear_cache('index.tpl');
$smarty->display('index.tpl');
?>
]]>
</programlisting>
</programlisting>
</example>
</sect1>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml