Files
smarty/docs/pt_BR/programmers/caching/caching-groups.xml
2004-04-13 11:47:32 +00:00

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ê pode fazer agrupamentos mais elaborados configurando grupos de cache_id. Isso é
realizado pela separação de cada sub-grupo com uma barra vertical "|" no valor do
cache_id. Você pode ter muitos sub-grupos com você 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ê tem display('themes/blue/index.tpl'), você não pode limpar o cache
para tudo que estiver sob o diretório "themes/blue". Se você quiser fazer isso, você deve
agrupá-los no cache_id, como display('themes/blue/index.tpl','themes|blue'); Então
você 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
-->