- updated for 2.6.3

- updates for new build system
- added missing files
- corrections from users
- revcheck comments for all files
- big up to didou and nuno, brilliant work
- make test: ok
- make: ok
This commit is contained in:
andreas
2004-07-16 14:32:31 +00:00
parent d89f626f62
commit 05d0bbbca1
177 changed files with 2251 additions and 1474 deletions

View File

@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.is.cached">
<title>is_cached (gecachte Version existiert)</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>is_cached</function></funcdef>
<paramdef>string <parameter>template</parameter></paramdef>
<paramdef>[string <parameter>cache_id</parameter>]</paramdef>
</funcprototype>
</funcsynopsis>
<!-- EN-Revision: 1.3 Maintainer: andreas Status: ready -->
<refentry id="api.is.cached">
<refnamediv>
<refname>is_cached (gecachte Version existiert)</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>bool</type><methodname>is_cached</methodname>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>cache_id</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>compile_id</parameter></methodparam>
</methodsynopsis>
<para>
Gibt 'true' zur&uuml;ck, wenn ein g&uuml;ltiger Cache f&uuml;r das angegebene Template existiert.
Dies funktioniert nur, wenn <link linkend="variable.caching">caching</link> eingeschaltet ist.
@@ -16,14 +21,18 @@
<example>
<title>is_cached</title>
<programlisting>
$smarty->caching = true;
if(!$smarty->is_cached("index.tpl")) {
// Datenbank-Abfragen, Variablen zuweisen...
}
$smarty->display("index.tpl");</programlisting>
<![CDATA[
<?php
$smarty->caching = true;
if(!$smarty->is_cached("index.tpl")) {
// Datenbank-Abfragen, Variablen zuweisen...
}
$smarty->display("index.tpl");
?>
]]>
</programlisting>
</example>
<para>
Als optionalen zweiten Parameter k&ouml;nnen Sie die 'cache_id' &uuml;bergeben,
@@ -32,16 +41,27 @@
<example>
<title>'is_cached' bei mehreren Template-Caches</title>
<programlisting>
$smarty->caching = true;
if(!$smarty->is_cached("index.tpl", "FrontPage")) {
// Datenbank Abfragen, Variablen zuweisen...
}
$smarty->display("index.tpl","FrontPage");</programlisting>
<![CDATA[
<?php
$smarty->caching = true;
if(!$smarty->is_cached("index.tpl", "FrontPage")) {
// Datenbank Abfragen, Variablen zuweisen...
}
$smarty->display("index.tpl", "FrontPage");
?>
]]>
</programlisting>
</example>
</sect1>
<note>
<title>Technische Bemerkung</title>
<para>
Wenn <literal>is_cached</literal> true zur&uuml;ck gibt, wird die Ausgabe geladen. Alle weiteren Aufrufe von <link linkend="api.display">display()</link> oder <link linkend="api.fetch">fetch()</link> werden aus diesem Cache bedient. Dies verhindert eine Race Condition, die auftauchen k&ouml;nnte, wenn ein anderes Script das besagte Template aus dem Cache l&ouml;scht. Das bedeutet nat&uuml;rlich auch, dass <link linkend="api.clear.cache">clear_cache()</link> und andere Cache spezifische Einstellungen keine Auswirkungen haben, nachdem <literal>is_cached</literal> true zur&uuml;ckgegeben hat.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -61,4 +81,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->