mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 12:21:36 +01:00 
			
		
		
		
	
		
			
	
	
		
			58 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
		
		
			
		
	
	
			58 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
|   | <?xml version="1.0" encoding="iso-8859-1"?> | |||
|  | <!-- $Revision$ --> | |||
|  |    <sect1 id="caching.groups"> | |||
|  |     <title>Grupos de Cache</title> | |||
|  | 	<para> | |||
|  | 	Voc<6F> pode fazer agrupamentos mais elaborados configurando grupos de cache_id. Isso <20> | |||
|  | 	realizado pela separa<72><61>o de cada sub-grupo com uma barra vertical "|" no valor do  | |||
|  | 	cache_id. Voc<6F> pode ter muitos sub-grupos com voc<6F> desejar. | |||
|  | 	</para> | |||
|  | 	<example> | |||
|  |      <title>Grupos de cache_id</title> | |||
|  |      <programlisting> | |||
|  | require('Smarty.class.php'); | |||
|  | $smarty = new Smarty; | |||
|  | 
 | |||
|  | $smarty->caching = true; | |||
|  | 
 | |||
|  | // clear all caches with "sports|basketball" as the first two cache_id groups | |||
|  | $smarty->clear_cache(null,"sports|basketball"); | |||
|  | 
 | |||
|  | // clear all caches with "sports" as the first cache_id group. This would | |||
|  | // include "sports|basketball", or "sports|(anything)|(anything)|(anything)|..." | |||
|  | $smarty->clear_cache(null,"sports"); | |||
|  | 
 | |||
|  | $smarty->display('index.tpl',"sports|basketball");</programlisting> | |||
|  |     </example> | |||
|  |    <note> | |||
|  |    <title>Notas T<>cnicas</title> | |||
|  |    <para> | |||
|  |    O agrupamento de cache id N<>O use o path do template como alguma parte do cache_id. | |||
|  |    Por exemplo, se voc<6F> tem display('themes/blue/index.tpl'), voc<6F> n<>o pode limpar o cache | |||
|  |    para tudo que estiver sob o diret<65>rio "themes/blue". Se voc<6F> quiser fazer isso, voc<6F> deve | |||
|  |    agrup<75>-los no cache_id, como display('themes/blue/index.tpl','themes|blue'); Ent<6E>o | |||
|  |    voc<6F> pode limpar os caches para o  | |||
|  |    tema azul com with clear_cache(null,'themes|blue'); | |||
|  |    </para> | |||
|  |    </note> | |||
|  | </sect1> | |||
|  | <!-- 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 | |||
|  | --> |