mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
52 lines
2.0 KiB
XML
52 lines
2.0 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 1.1 Maintainer: nobody Status: ready -->
|
|
<sect1 id="variable.cache.lifetime">
|
|
<title>$cache_lifetime</title>
|
|
<para>
|
|
Isso é o comprimento de tempo em segundos que um cache de template é válido.
|
|
Uma vez que este tempo está expirado, o cache irá ser regerado. $caching deve
|
|
ser configurado para "true" para $cache_lifetime para ter algum propósito. Um valor de -1
|
|
irá forçar o cache a nunca expirar. Um valor de 0 irá fazer com que o cache seja sempre regerado
|
|
(bom somente para testes, o método mais eficiente de desabilitar caching é setá-lo para
|
|
<link
|
|
linkend="variable.caching">$caching</link> = false.)
|
|
</para>
|
|
<para>
|
|
Se <link linkend="variable.force.compile">$force_compile</link> está
|
|
habilitado, os arquivos de cache serão regerados todo o tempo, eficazmente
|
|
desativando caching. Você pode limpar todos os arquivos de cache com a função <link
|
|
linkend="api.clear.all.cache">clear_all_cache()</link>, ou
|
|
arquivos individuais de cache (ou grupos) com a função <link
|
|
linkend="api.clear.cache">clear_cache()</link>.
|
|
</para>
|
|
<note>
|
|
<title>Notas Técnicas</title>
|
|
<para>
|
|
Se você quiser dar para certos templates seu próprio tempo de vida de um cache,
|
|
você poderia fazer isso configurando <link linkend="variable.caching">$caching</link> = 2,
|
|
então configure $cache_lifetime para um único valor somente antes de chamar display()
|
|
ou fetch().
|
|
</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
|
|
--> |