cvs: smarty /docs/en/programmers/api-variables variable-cache-lifetime.xml /docs/en/programmers/caching caching-setting-up.xml
[email protected] ("boots") Thu, 04 May 2006 19:22:07 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvsboots1146770527@cvsserver> |
boots Thu May 4 19:22:07 2006 UTC
Modified files:
/smarty/docs/en/programmers/api-variables
variable-cache-lifetime.xml
/smarty/docs/en/programmers/caching caching-setting-up.xml
Log:
Modified caching sections to remove incorrect references to $caching = true or $caching = false (replaceing with 0, 1, 2 as appropriate. Also minor wording changes.
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/programmers/api-variables/variable-cache-lifetime.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-variables/variable-cache-lifetime.xml
diff -u smarty/docs/en/programmers/api-variables/variable-cache-lifetime.xml:1.3 smarty/docs/en/programmers/api-variables/variable-cache-lifetime.xml:1.4
--- smarty/docs/en/programmers/api-variables/variable-cache-lifetime.xml:1.3 Mon May 23 15:43:01 2005
+++ smarty/docs/en/programmers/api-variables/variable-cache-lifetime.xml Thu May 4 19:22:06 2006
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<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.)
+ be turned on (either 1 or 2) 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> = 0.)
</para>
<para>
If <link linkend="variable.force.compile">$force_compile</link> is
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/programmers/caching/caching-setting-up.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/programmers/caching/caching-setting-up.xml
diff -u smarty/docs/en/programmers/caching/caching-setting-up.xml:1.6 smarty/docs/en/programmers/caching/caching-setting-up.xml:1.7
--- smarty/docs/en/programmers/caching/caching-setting-up.xml:1.6 Sat Dec 10 09:10:27 2005
+++ smarty/docs/en/programmers/caching/caching-setting-up.xml Thu May 4 19:22:07 2006
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<sect1 id="caching.setting.up">
<title>Setting Up Caching</title>
<para>
- The first thing to do is enable caching by setting <link
+ The first thing to do is enable caching by setting <link
linkend="variable.caching">$caching</link> = 1 (or 2).
</para>
<example>
@@ -14,7 +14,7 @@
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
$smarty->display('index.tpl');
?>
@@ -34,8 +34,8 @@
The files in the
<link linkend="variable.cache.dir">$cache_dir</link>
are named similar to the template name.
- Although they end in the ".php" extention, they are not really executable
- php scripts. Do not edit these files!
+ Although they end in the ".php" extention, they are not intended to be
+ directly executable. Do not edit these files!
</para>
</note>
<para>
@@ -81,9 +81,9 @@
every template file and config file that is involved with the cache file is
checked for modification. If any of the files have been modified since the
cache was generated, the cache is immediately regenerated. This is a slight
- overhead so for optimum performance, leave
+ overhead so for optimum performance, set
<link linkend="variable.compile.check">$compile_check</link>
- set to false.
+ to false.
</para>
<example>
<title>enabling $compile_check</title>
@@ -93,7 +93,7 @@
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
$smarty->compile_check = true;
$smarty->display('index.tpl');
@@ -111,7 +111,7 @@
linkend="chapter.debugging.console">debugging</link>
purposes only, a more
efficient way of disabling caching is to set <link
- linkend="variable.caching">$caching</link> = false (or 0.)
+ linkend="variable.caching">$caching</link> = 0.
</para>
<para>
The <link linkend="api.is.cached">is_cached()</link> function
@@ -127,7 +127,7 @@
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
if(!$smarty->is_cached('index.tpl')) {
// No cache available, do variable assignments here.
@@ -145,7 +145,7 @@
linkend="language.function.insert">{insert}</link> template function. Let's
say the whole page can be cached except for a banner that is displayed down
the right side of the page. By using an
- <link linkend="language.function.insert">{insert}</link>
+ <link linkend="language.function.insert">{insert}</link>
function for the banner, you
can keep this element dynamic within the cached content. See the
documentation on <link linkend="language.function.insert">{insert}</link> for
@@ -167,7 +167,7 @@
require('Smarty.class.php');
$smarty = new Smarty;
-$smarty->caching = true;
+$smarty->caching = 1;
// clear out all cache files
$smarty->clear_all_cache();