mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 04:11:37 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			73 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="iso-8859-1"?>
 | |
| <!-- $Revision$ -->
 | |
| <!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
 | |
| 
 | |
| <refentry id="api.clear.cache">
 | |
|  <refnamediv>
 | |
|   <refname>clear_cache()</refname>
 | |
|   <refpurpose>Efface le cache d'un template spécifique</refpurpose>
 | |
|  </refnamediv>
 | |
|  <refsect1>
 | |
|   <title>Description</title>
 | |
|   <methodsynopsis>
 | |
|    <type>void</type><methodname>clear_cache</methodname>
 | |
|    <methodparam><type>string</type><parameter>template</parameter></methodparam>
 | |
|    <methodparam choice="opt"><type>string</type><parameter>cache_id</parameter></methodparam>
 | |
|    <methodparam choice="opt"><type>string</type><parameter>compile_id</parameter>
 | |
|    </methodparam>
 | |
|    <methodparam choice="opt"><type>int</type><parameter>expire_time</parameter></methodparam>
 | |
|   </methodsynopsis>
 | |
|   <para>
 | |
|    Si vous avez <link linkend="caching.multiple.caches">plusieurs fichiers de cache</link>
 | |
|    pour ce template, vous pouvez en spécifier un en particulier en passant son identifiant
 | |
|    <parameter>cache_id</parameter> en deuxième paramètre.
 | |
|    Vous pouvez aussi passer un identifiant de compilation
 | |
|    <link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
 | |
|    en  troisième paramètre. Vous pouvez <link linkend="caching.groups">grouper</link>
 | |
|    des templates ensemble afin qu'ils puissent être supprimés en groupe. Référez-vous à la
 | |
|    section sur le <link linkend="caching">cache</link> pour plus d'informations.
 | |
|    Vous pouvez passer un quatrième paramètre pour indiquer un âge
 | |
|    minimum en secondes que le fichier en cache doit avoir avant d'être effacé.
 | |
|   </para>
 | |
|   <example>
 | |
|    <title>Exemple avec clear_cache()</title>
 | |
|    <programlisting role="php">
 | |
| <![CDATA[
 | |
| <?php
 | |
| // efface le fichier de cache de ce template
 | |
| $smarty->clear_cache('index.tpl');
 | |
| 
 | |
| // efface un fichier de cache grâce à son identifiant de cache
 | |
| $smarty->clear_cache('index.tpl','CACHEID');
 | |
| ?>
 | |
| ]]>
 | |
|    </programlisting>
 | |
|   </example>
 | |
|   <para>
 | |
|    Voir aussi le
 | |
|    <link linkend="api.clear.all.cache">clear_all_cache()</link> et
 | |
|    <link linkend="caching">cache</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
 | |
|  --> |