Files
smarty/docs/ja/programmers/api-functions/api-clear-compiled-tpl.xml

71 lines
2.5 KiB
XML
Raw Normal View History

2007-04-21 12:13:34 +00:00
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 2593 Maintainer: takagi Status: ready -->
2007-04-21 12:13:34 +00:00
<!-- CREDITS: mat-sh,daichi,joe -->
<refentry id="api.clear.compiled.tpl">
<refnamediv>
<refname>clear_compiled_tpl()</refname>
<refpurpose>指定したテンプレートのキャッシュを破棄します。</refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<methodsynopsis>
<type>void</type><methodname>clear_compiled_tpl</methodname>
<methodparam choice="opt"><type>string</type><parameter>tpl_file</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>compile_id</parameter>
</methodparam>
<methodparam choice="opt"><type>int</type><parameter>exp_time</parameter></methodparam>
</methodsynopsis>
<para>
指定したテンプレートリソースをコンパイルした内容を破棄します。
何も指定しなかった場合は、すべてのコンパイル済みテンプレートファイルを破棄します。
<link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
を渡すと、指定した
<link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
のテンプレートのみを破棄します。exp_time を指定すると、
<parameter>exp_time</parameter> 秒以上経過しているファイルのみが破棄されます。
デフォルトでは、経過時間にかかわらず全てのコンパイル済みテンプレートを破棄します。
この関数は上級者のみが使用するもので、通常は不要です。
</para>
<example>
<title>clear_compiled_tpl()</title>
<programlisting role="php">
<![CDATA[
<?php
// 指定したテンプレートリソースを破棄します
$smarty->clear_compiled_tpl('index.tpl');
// コンパイルディレクトリの内容を全て破棄します
$smarty->clear_compiled_tpl();
?>
]]>
</programlisting>
</example>
<para>
<link linkend="api.clear.cache"><varname>clear_cache()</varname></link>
も参照してください。
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->