| 
									
										
										
										
											2004-04-13 11:47:32 +00:00
										 |  |  |  | <?xml version="1.0" encoding="iso-8859-1"?> | 
					
						
							|  |  |  |  | <!-- $Revision$ --> | 
					
						
							| 
									
										
										
										
											2005-05-25 16:49:34 +00:00
										 |  |  |  | <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> | 
					
						
							| 
									
										
										
										
											2004-12-26 17:02:12 +00:00
										 |  |  |  | <refentry id="api.clear.cache"> | 
					
						
							|  |  |  |  |  <refnamediv> | 
					
						
							|  |  |  |  |   <refname>clear_cache</refname> | 
					
						
							|  |  |  |  |   <refpurpose></refpurpose> | 
					
						
							|  |  |  |  |  </refnamediv> | 
					
						
							|  |  |  |  |  <refsect1> | 
					
						
							|  |  |  |  |   <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> | 
					
						
							|  |  |  |  |    Utilis<69>e pour nettoyer le(s) fichier(s) de cache d'un  | 
					
						
							|  |  |  |  |    <parameter>template</parameter> en particulier. | 
					
						
							|  |  |  |  |    Si vous avez plusieurs fichiers de cache pour ce template, vous | 
					
						
							|  |  |  |  |    pouvez en sp<73>cifier un en particulier en passant son identifiant  | 
					
						
							|  |  |  |  |    <parameter>cache_id</parameter> en deuxi<78>me param<61>tre.  | 
					
						
							|  |  |  |  |    Vous pouvez aussi passer un identifiant de compilation  | 
					
						
							|  |  |  |  |    <parameter>compile_id</parameter> en  troisi<73>me param<61>tre.  | 
					
						
							|  |  |  |  |    Vous pouvez grouper des templates ensemble afin qu'ils puissent  | 
					
						
							| 
									
										
										
										
											2004-12-26 21:12:45 +00:00
										 |  |  |  |    <20>tre supprim<69>s en groupe. R<>f<EFBFBD>rez-vous <20> la section sur le | 
					
						
							| 
									
										
										
										
											2004-12-26 17:02:12 +00:00
										 |  |  |  |    <link linkend="caching">cache</link> pour plus d'informations.  | 
					
						
							|  |  |  |  |    Vous pouvez passer un quatri<72>me param<61>tre pour indiquer un <20>ge  | 
					
						
							|  |  |  |  |    minimum en secondes que le fichier en cache doit avoir avant d'<27>tre effac<61>. | 
					
						
							| 
									
										
										
										
											2004-05-23 15:50:53 +00:00
										 |  |  |  |   </para> | 
					
						
							|  |  |  |  |   <example> | 
					
						
							| 
									
										
										
										
											2004-12-26 17:02:12 +00:00
										 |  |  |  |    <title>Exemple avec clear_cache</title> | 
					
						
							|  |  |  |  |    <programlisting role="php"> | 
					
						
							|  |  |  |  | <![CDATA[ | 
					
						
							|  |  |  |  | <?php | 
					
						
							| 
									
										
										
										
											2004-04-13 11:47:32 +00:00
										 |  |  |  | // efface le fichier de cache de ce template | 
					
						
							|  |  |  |  | $smarty->clear_cache("index.tpl"); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-12-26 17:02:12 +00:00
										 |  |  |  | // efface un fichier de cache gr<67>ce <20> son identifiant de cache | 
					
						
							|  |  |  |  | $smarty->clear_cache("index.tpl","CACHEID"); | 
					
						
							|  |  |  |  | ?> | 
					
						
							|  |  |  |  | ]]> | 
					
						
							|  |  |  |  |    </programlisting> | 
					
						
							| 
									
										
										
										
											2004-05-23 15:50:53 +00:00
										 |  |  |  |   </example> | 
					
						
							| 
									
										
										
										
											2005-05-25 16:49:34 +00:00
										 |  |  |  |   <para> | 
					
						
							|  |  |  |  |    Voir aussi le | 
					
						
							|  |  |  |  |    <link linkend="caching">cache</link>. | 
					
						
							|  |  |  |  |   </para> | 
					
						
							| 
									
										
										
										
											2004-12-26 17:02:12 +00:00
										 |  |  |  |  </refsect1> | 
					
						
							|  |  |  |  | </refentry> | 
					
						
							| 
									
										
										
										
											2005-05-25 16:49:34 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-05-23 15:50:53 +00:00
										 |  |  |  |  <!-- 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 | 
					
						
							| 
									
										
										
										
											2005-05-25 16:49:34 +00:00
										 |  |  |  |  --> |