mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-04 06:11:37 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<?xml version="1.0" encoding="iso-8859-1"?>
 | 
						|
<!-- $Revision$ -->
 | 
						|
   <sect1 id="variable.cache.lifetime">
 | 
						|
    <title>$cache_lifetime</title>
 | 
						|
    <para>
 | 
						|
     This is the length of time in seconds that a template cache is valid.
 | 
						|
     Once this time has expired, the cache will be regenerated. $caching must
 | 
						|
     be set to "true" for $cache_lifetime to have any purpose. A value of -1
 | 
						|
     will force the cache to never expire. A value of 0 will cause the cache
 | 
						|
     to always regenerate (good for testing only, to disable caching a more
 | 
						|
     efficient method is to set <link
 | 
						|
     linkend="variable.caching">$caching</link> = false.)
 | 
						|
    </para>
 | 
						|
    <para>
 | 
						|
     If <link linkend="variable.force.compile">$force_compile</link> is
 | 
						|
     enabled, the cache files will be regenerated every time, effectively
 | 
						|
     disabling caching. You can clear all the cache files with the <link
 | 
						|
     linkend="api.clear.all.cache">clear_all_cache()</link> function, or
 | 
						|
     individual cache files (or groups) with the <link
 | 
						|
     linkend="api.clear.cache">clear_cache()</link> function.
 | 
						|
    </para>
 | 
						|
    <note>
 | 
						|
     <title>Technical Note</title>
 | 
						|
     <para>
 | 
						|
      If you want to give certain templates their own cache lifetime, you could
 | 
						|
      do this by setting <link linkend="variable.caching">$caching</link> = 2,
 | 
						|
      then set $cache_lifetime to a unique value just before calling
 | 
						|
      <link linkend="api.display">display()</link>
 | 
						|
      or <link linkend="api.fetch">fetch()</link>.
 | 
						|
     </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
 | 
						|
-->
 |