mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 04:11:37 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="iso-8859-1"?>
 | |
| <!-- $Revision$ -->
 | |
|   <chapter id="caching">
 | |
|    <title>Caching</title>
 | |
|    <para>
 | |
|    Caching is used to speed up a call to <link
 | |
|    linkend="api.display">display()</link> or <link
 | |
|    linkend="api.fetch">fetch()</link> by saving its output to a file. If a
 | |
|    cached version of the call is available, that is displayed instead of
 | |
|    regenerating the output. Caching can speed things up tremendously,
 | |
|    especially templates with longer computation times. Since the output of
 | |
|    display() or fetch() is cached, one cache file could conceivably be made up
 | |
|    of several template files, config files, etc.
 | |
|    </para>
 | |
|    <para>
 | |
|    Since templates are dynamic, it is important to be careful what you are
 | |
|    caching and for how long. For instance, if you are displaying the front page
 | |
|    of your website that does not change its content very often, it might work
 | |
|    well to cache this page for an hour or more. On the other hand, if you are
 | |
|    displaying a page with a weather map containing new information by the
 | |
|    minute, it would not make sense to cache this page.
 | |
|    </para>
 | |
| &programmers.caching.caching-setting-up;
 | |
| &programmers.caching.caching-multiple-caches;
 | |
| &programmers.caching.caching-groups;
 | |
| 
 | |
| &programmers.caching.caching-cacheable;
 | |
| </chapter>
 | |
| <!-- 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
 | |
| -->
 |