Files
smarty/docs/en/programmers/caching.xml

52 lines
1.9 KiB
XML
Raw Normal View History

2004-03-28 15:15:38 +00:00
<?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
2006-09-27 07:20:56 +00:00
linkend="api.display"><varname>display()</varname></link> or <link
linkend="api.fetch"><varname>fetch()</varname></link> by saving its output
to a file. If a
2004-03-28 15:15:38 +00:00
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
2006-09-27 07:20:56 +00:00
<link linkend="api.display"><varname>display()</varname></link> or
<link linkend="api.fetch"><varname>fetch()</varname></link> is cached,
one cache file could conceivably be made up
2004-03-28 15:15:38 +00:00
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
2006-09-27 07:20:56 +00:00
displaying a page with a timetable containing new information by the
2004-03-28 15:15:38 +00:00
minute, it would not make sense to cache this page.
</para>
2004-04-13 11:47:32 +00:00
&programmers.caching.caching-setting-up;
&programmers.caching.caching-multiple-caches;
&programmers.caching.caching-groups;
2004-03-28 15:15:38 +00:00
2004-04-13 11:47:32 +00:00
&programmers.caching.caching-cacheable;
2004-03-28 15:15:38 +00:00
</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
-->