cvs: peardoc /en/package/caching/cache-lite/cache-lite-output cache_lite_output.xml end.xml start.xml

From: Date: Mon, 26 Apr 2004 21:14:08 +0000
Subject: cvs: peardoc /en/package/caching/cache-lite/cache-lite-output cache_lite_output.xml end.xml start.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-3739@lists.php.net to get a copy of this message
fab Mon Apr 26 17:14:08 2004 EDT Added files: /peardoc/en/package/caching/cache-lite/cache-lite-output cache_lite_output.xml end.xml start.xml Log: still work in progress (comments are welcome)

http://cvs.php.net/co.php/peardoc/en/package/caching/cache-lite/cache-lite-output/cache_lite_output.xml?r=1.1&p=1 Index: peardoc/en/package/caching/cache-lite/cache-lite-output/cache_lite_output.xml +++ peardoc/en/package/caching/cache-lite/cache-lite-output/cache_lite_output.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.cache-lite.cache-lite-output.cache-lite-output"> <refnamediv> <refname>constructor <function>Cache_Lite_Output::Cache_Lite_Output</function></refname> <refpurpose>Constructor</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;LiteOutput.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void constructor <function>Cache_Lite_Output::Cache_Lite_Output</function></funcdef> <paramdef>array <parameter>$options</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.cache-lite.cache-lite-output.cache-lite-output.desc"> &title.desc; <para>The constructor of the Cache_Lite_Output class. You can give an associative array as an argument to set a lot of options.</para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.cache-lite-output.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.array; <parameter>$options</parameter> </term> <listitem> <para> associative array to set a lot of options </para> </listitem> </varlistentry> </variablelist> </para> <para> <table> <title></title> <tgroup cols="4"> <thead> <row> <entry>Option</entry> <entry>Data Type</entry> <entry>Default Value</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry> cacheDir </entry> <entry> &type.string; </entry> <entry> /tmp/ </entry> <entry> directory where to put the cache file (with a trailing slash at the end) </entry> </row> <row> <entry> caching </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> enable / disable caching </entry> </row> <row> <entry> lifeTime </entry> <entry> &type.int; </entry> <entry> 3600 </entry> <entry> cache lifetime in seconds </entry> </row> <row> <entry> fileLocking </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> enable / disable fileLocking (can avoid cache corruption under bad circumstances) </entry> </row> <row> <entry> writeControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> enable / disable write control (enable write control will lightly slow the cache writing but not the cache reading, write control can detect some corrupt cache files but maybe it's not a perfect control) </entry> </row> <row> <entry> readControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> enable / disable read control (if enabled, a control key is embeded in cache file and this key is compared with the one calculated after the reading) </entry> </row> <row> <entry> readControlType </entry> <entry> &type.string; </entry> <entry> crc32 </entry> <entry> Type of read control (only if read control is enabled). Must be 'md5' (for a md5 hash control (best but slowest)), 'crc32' (for a crc32 hash control (lightly less safe but faster)) or 'strlen' (for a length only test (fastest)) </entry> </row> <row> <entry> pearErrorMode </entry> <entry> &type.int; </entry> <entry> CACHE_LITE_ERROR_RETURN </entry> <entry> pear error mode (when raiseError is called) (CACHE_LITE_ERROR_RETURN for just returning a PEAR_Error object or CACHE_LITE_ERROR_DIE for immediate stop of the script (good for debug)) </entry> </row> <row> <entry> fileNameProtection </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> file Name protection (if set to true, you can use any cache id or group name, if set to false, it can be faster but cache ids and group names will be used directly in cache file names so be carefull with special characters...) </entry> </row> <row> <entry> automaticSerialization </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> enable / disable automatic serialization (it can be used to save directly datas which aren't strings but it's slower) </entry> </row> <row> <entry> memoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [BETA QUALITY] enable / disable "Memory Caching" (NB : there is no lifetime for memory caching, only the end of the script) </entry> </row> <row> <entry> onlyMemoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [BETA QUALITY] enable / disable "Only Memory Caching" (if enabled, files are not used anymore) </entry> </row> <row> <entry> memoryCachingLimit </entry> <entry> &type.int; </entry> <entry> 1000 </entry> <entry> [BETA QUALITY] max number of records to store into memory caching </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.cache-lite-output.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- 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 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 --> http://cvs.php.net/co.php/peardoc/en/package/caching/cache-lite/cache-lite-output/end.xml?r=1.1&p=1 Index: peardoc/en/package/caching/cache-lite/cache-lite-output/end.xml +++ peardoc/en/package/caching/cache-lite/cache-lite-output/end.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.cache-lite.cache-lite-output.end"> <refnamediv> <refname><function>Cache_Lite_Output::end</function></refname> <refpurpose>Stop the output buffering started by the start() method and store the output to a cache file</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;LiteOutput.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Cache_Lite_Output::end</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.cache-lite.cache-lite-output.end.desc"> &title.desc; <para> Stop the output buffering started by the start() method and store the output to a cache file </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.end.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite-output.end.example"> &title.example; <example> <title>classical using</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite/Output.php"; $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 7200, 'pearErrorMode' => CACHE_LITE_ERROR_DIE ); $cache = Cache_Lite_Output($options); if (!($cache->start('id_of_the_page'))) { // Cache not hit ! // All the output is bufferised until the end() method // (...) $cache->end(); // the bufferised output is now stored into a cache file } ?> ]]> </programlisting> </example> </refsect1> </refentry> <!-- 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 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 --> http://cvs.php.net/co.php/peardoc/en/package/caching/cache-lite/cache-lite-output/start.xml?r=1.1&p=1 Index: peardoc/en/package/caching/cache-lite/cache-lite-output/start.xml +++ peardoc/en/package/caching/cache-lite/cache-lite-output/start.xml <!-- $Revision: 1.1 $ --> <refentry id="package.default.cache-lite.cache-lite-output.start"> <refnamediv> <refname><function>Cache_Lite_Output::start</function></refname> <refpurpose>Test if a cache is available and (if yes) return it to the browser. Else, the output buffering is activated.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;LiteOutput.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Cache_Lite_Output::start</function></funcdef> <paramdef>string <parameter>$id</parameter></paramdef> <paramdef>string <parameter> <optional>$group = 'default'</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.cache-lite.cache-lite-output.start.desc"> &title.desc; <para> Test if a cache is available and (if yes) return it to the browser. Else, the output buffering is activated. </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.start.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$id</parameter> </term> <listitem> <para> cache id </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> name of the cache group </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.start.returns"> &title.returns; <para> <emphasis>returns</emphasis> true if the cache is hit (false else) </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.start.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite-output.start.example"> &title.example; <example> <title>classical using</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite/Output.php"; $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 7200, 'pearErrorMode' => CACHE_LITE_ERROR_DIE ); $cache = Cache_Lite_Output($options); if (!($cache->start('id_of_the_page'))) { // Cache not hit ! // All the output is bufferised until the end() method // (...) $cache->end(); } ?> ]]> </programlisting> </example> </refsect1> </refentry> <!-- 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 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 -->
« previous php.pear.doc (#3739) next »