Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 8377d4bb25a3992aad680df2952f4b71 > files > 13

php-smarty-doc-2.6.26-1mdv2010.0.noarch.rpm

<HTML
><HEAD
><TITLE
>clear_cache()</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Smarty Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Smarty Class Methods()"
HREF="api.functions.html"><LINK
REL="PREVIOUS"
TITLE="clear_assign()"
HREF="api.clear.assign.html"><LINK
REL="NEXT"
TITLE="clear_compiled_tpl()"
HREF="api.clear.compiled.tpl.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Smarty Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="api.clear.assign.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="api.clear.compiled.tpl.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="api.clear.cache"
></A
>clear_cache()</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN5607"
></A
>clear_cache()&nbsp;--&nbsp;clears the cache for a specific template</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN5610"
></A
><H2
>Description</H2
>void <B
CLASS="methodname"
>clear_cache</B
> ( string template [, string cache_id [, string compile_id [, int expire_time]]])<BR
></BR
><P
></P
><UL
><LI
><P
>&#13;   If you have <A
HREF="caching.multiple.caches.html"
>multiple caches</A
>
   for a template, you can clear a specific
   cache by supplying the <TT
CLASS="parameter"
><I
>cache_id</I
></TT
> as the second
   parameter.
   </P
></LI
><LI
><P
>&#13;   You can also pass a
   <A
HREF="variable.compile.id.html"
><TT
CLASS="parameter"
><I
>$compile_id</I
></TT
></A
>
   as a third parameter.
   You can <A
HREF="caching.groups.html"
>group templates together</A
>
    so they can be removed as a group, see the
   <A
HREF="caching.html"
>caching section</A
> for more
   information.
   </P
></LI
><LI
><P
>&#13;   As an optional fourth parameter, you can supply a
   minimum age in seconds the cache file must be before it will
   get cleared.
  </P
></LI
></UL
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN5640"
></A
><P
><B
>Example 13-1. clear_cache()</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;clear&nbsp;the&nbsp;cache&nbsp;for&nbsp;a&nbsp;template<br /></span><span style="color: #0000BB">$smarty</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clear_cache</span><span style="color: #007700">(</span><span style="color: #DD0000">'index.tpl'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;clear&nbsp;the&nbsp;cache&nbsp;for&nbsp;a&nbsp;particular&nbsp;cache&nbsp;id&nbsp;in&nbsp;an&nbsp;multiple-cache&nbsp;template<br /></span><span style="color: #0000BB">$smarty</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clear_cache</span><span style="color: #007700">(</span><span style="color: #DD0000">'index.tpl'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'MY_CACHE_ID'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;  See also
  <A
HREF="api.clear.all.cache.html"
><TT
CLASS="varname"
>clear_all_cache()</TT
></A
>
  and
  <A
HREF="caching.html"
><TT
CLASS="varname"
>caching</TT
></A
> section.
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="api.clear.assign.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="api.clear.compiled.tpl.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>clear_assign()</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="api.functions.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>clear_compiled_tpl()</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>