cvs: peardoc /ja/package/caching cache-lite.xml /ja/package/caching/cache-lite constants.xml intro.xml /ja/package/caching/cache-lite/cache-lite
cache_lite.xml clean.xml get.xml getmemorycachingstate.xml lastmodified.xml raiseerror.xml remove.xml save.xml savememorycachingstate.xml
setlifetime.xml settodebug.xml /ja/package/caching/cache-lite/cache-lite-function cache_lite_function.xml call.xml
/ja/package/caching/cache-lite/cache-lite-output cache_lite_output.xml end.xml start.xml

From: Date: Tue, 19 Apr 2005 20:13:58 +0000
Subject: cvs: peardoc /ja/package/caching cache-lite.xml /ja/package/caching/cache-lite constants.xml intro.xml /ja/package/caching/cache-lite/cache-lite
cache_lite.xml clean.xml get.xml getmemorycachingstate.xml lastmodified.xml raiseerror.xml remove.xml save.xml savememorycachingstate.xml
setlifetime.xml settodebug.xml /ja/package/caching/cache-lite/cache-lite-function cache_lite_function.xml call.xml
/ja/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-5937@lists.php.net to get a copy of this message
elf Tue Apr 19 16:13:58 2005 EDT Added files: /peardoc/ja/package/caching cache-lite.xml /peardoc/ja/package/caching/cache-lite constants.xml intro.xml /peardoc/ja/package/caching/cache-lite/cache-lite cache_lite.xml clean.xml get.xml getmemorycachingstate.xml lastmodified.xml raiseerror.xml remove.xml save.xml savememorycachingstate.xml setlifetime.xml settodebug.xml /peardoc/ja/package/caching/cache-lite/cache-lite-function cache_lite_function.xml call.xml /peardoc/ja/package/caching/cache-lite/cache-lite-output cache_lite_output.xml end.xml start.xml Log: o added japanese manual (thanks shimooka)

http://cvs.php.net/co.php/peardoc/ja/package/caching/cache-lite.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite.xml +++ peardoc/ja/package/caching/cache-lite.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: shimooka Status: ready --> <sect1 id="package.caching.cache-lite"> <title>Cache_Lite</title> <para> Cache_Lite は高速で軽量かつ安全なキャッシュシステムを提供します。 ファイルコンテナに対して最適化されており、キャッシュの汚染から保護されます (これはファイルロックやハッシュによるテストを行うためです)。 </para> &package.caching.cache-lite.intro; &package.caching.cache-lite.cache-lite.cache-lite; &package.caching.cache-lite.cache-lite.get; &package.caching.cache-lite.cache-lite.save; &package.caching.cache-lite.cache-lite.remove; &package.caching.cache-lite.cache-lite.clean; &package.caching.cache-lite.cache-lite.settodebug; &package.caching.cache-lite.cache-lite.setlifetime; &package.caching.cache-lite.cache-lite.savememorycachingstate; &package.caching.cache-lite.cache-lite.getmemorycachingstate; &package.caching.cache-lite.cache-lite.lastmodified; &package.caching.cache-lite.cache-lite.raiseerror; &package.caching.cache-lite.cache-lite-output.cache-lite-output; &package.caching.cache-lite.cache-lite-output.start; &package.caching.cache-lite.cache-lite-output.end; &package.caching.cache-lite.cache-lite-function.cache-lite-function; &package.caching.cache-lite.cache-lite-function.call; </sect1> <!-- 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/ja/package/caching/cache-lite/constants.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/constants.xml +++ peardoc/ja/package/caching/cache-lite/constants.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.default.cache-lite.constants"> <refnamediv> <refname>Package Cache_Lite Constants</refname> <refpurpose>定義済みかつ Cache_Lite で使用される定数</refpurpose> </refnamediv> <refsect1 id="package.default.cache-lite.constants.details"> <title>全ての定数</title> <refsect2 id="package.default.cache-lite.constants.details.lite---php"> <title> 定数は Lite.php で定義されています。 </title> <para> <table> <title>Constants defined in Lite.php</title> <tgroup cols="3"> <thead> <row> <entry>名前</entry> <entry>値</entry> <entry>行番号</entry> </row> </thead> <tbody> <row> <entry>CACHE_LITE_ERROR_DIE</entry> <entry>8</entry> <entry>30</entry> </row> <row> <entry>CACHE_LITE_ERROR_RETURN</entry> <entry>1</entry> <entry>29</entry> </row> </tbody> </tgroup> </table> </para> </refsect2> </refsect1> </refentry> <!-- Generated by phpDocumentor v 1.2.3 http://www.phpdoc.org --> <!-- 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/ja/package/caching/cache-lite/intro.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/intro.xml +++ peardoc/ja/package/caching/cache-lite/intro.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.intro"> <refnamediv> <refname>導入</refname> <refpurpose>Cache_Lite の導入</refpurpose> </refnamediv> <refsect1 id="package.caching.cache-lite.intro.desc"> &title.desc; <para> PEAR::Cache_Lite は小さなキャッシュシステムです。 高トラフィックな Web サイト向けに最適化されていますので、本当に高速でかつ安全です (これはファイルロックや対汚染のテストを行うためです)。 </para> <para> メモ : Cache_Lite の独立した中国語ドキュメントは <ulink url="http://rainx.phpmore.com/manual/cache_lite.html">このページ</ulink> で利用できます。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.intro.technical"> <title>ゴールと技術的な詳細</title> <refsect2 id="package.caching.cache-lite.intro.technical.speed"> <title>スピード</title> <para> とりわけ、PEAR::Cache_Lite は非常に高速である必要があります。 これはハイレベルなハードウェアソリューションでダウンしない高トラフィックな サイトでの PEAR 利用の可能性を与えます。 </para> <para> cache_lite の技術的な選択についての詳細は、 <ulink url="http://cvs.php.net/co.php/pear/Cache_Lite/docs/technical?r=1.1">このドキュメント</ulink> にあります。 しかし、エラーが発生した場合 (非常に稀です) の主となるアイデア <emphasis>だけ</emphasis>は、PEAR.php ファイルに含まれています。 </para> </refsect2> <refsect2 id="package.caching.cache-lite.intro.technical.simplicity"> <title>シンプルさ</title> <para> キャッシュシステムはしばしばアプリケーションレイヤに埋め込まれるので、 PEAR::Cache_Lite のカーネルは小さく、 かつ適用するライセンスについて融通が利く必要があります (LGPL)。 高度な機能性はコアを拡張するファイルを支持します。 </para> </refsect2> <refsect2> <title>セキュリティ</title> <para> 高トラフィックな Web サイトでは、 キャッシュシステムはキャッシュファイルの汚染から保護する必要があります (他から読み書きモードでアクセスするためです)。 ほとんどのキャッシュシステムでは、 この問題に対する保護機能が提供されていません。 </para> <para> ファイルのロックは完全な解決法ではありません。 NFSやマルチスレッドサーバでは役に立たないからです。 そのため、PEAR::Cache_Lite ではこれに加えてあらゆる状況におけるデータ保全を保証するために 2つのメカニズム (ハッシュキーに基づく) を提供しています。 詳細は前の段落にあるリンクを参照してください。 </para> </refsect2> </refsect1> <refsect1 id="package.caching.cache-lite.intro.usage"> <title>使用法</title> <refsect2 id="package.caching.cache-lite.intro.usage.general"> <title>一般的な使用法</title> <para> Cache_Lite の全てのモジュールは同じ考え方に従っています。 </para> <para> パラメータ (デフォルトではない他の値) は連想配列を使って コンストラクタに渡されます。 </para> <para> キャッシュファイルはキャッシュID (と最後にはグループ) によって識別されます。柔軟性を持たせるため、 ID のロジックは開発者が選択することができます。 </para> </refsect2> <refsect2 id="package.caching.cache-lite.intro.usage.core"> <title>コア</title> <para> 簡単な例から始めましょう : とある一意な変数 (文字列) をもってページが生成され、復元されます。 <programlisting role="php"> <![CDATA[ <?php // パッケージを include する require_once('Cache/Lite.php'); // このキャッシュのIDを設定する $id = '123'; // いくつかのオプションを設定する $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 3600 ); // Cache_Lite オブジェクトを生成する $Cache_Lite = new Cache_Lite($options); // このIDに対する有効なキャッシュがあるかどうかテストする if ($data = $Cache_Lite->get($id)) { // キャッシュがヒットした ! // コンテンツは $data に入っている // (...) } else { // 有効なキャッシュが見つからなかった (このページを生成する必要がある) // キャッシュミス ! // キャッシュに入れるデータを $data に入れる // (...) $Cache_Lite->save($data); } ?> ]]> </programlisting> </para> <para> もしブロック毎のキャッシュを使用したいがグローバルキャッシュにしたくない場合、次のようなスクリプトになります: <programlisting role="php"> <![CDATA[ <?php require_once('Cache/Lite.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 3600 ); // Cache_Lite オブジェクトを生成する $Cache_Lite = new Cache_Lite($options); if ($data = $Cache_Lite->get('block1')) { echo($data); } else { $data = 'Data of the block 1'; $Cache_Lite->save($data); } echo('<br><br>Non cached line !<br><br>'); if ($data = $Cache_Lite->get('block2')) { echo($data); } else { $data = 'Data of the block 2'; $Cache_Lite->save($data); } ?> ]]> </programlisting> </para> </refsect2> <refsect2 id="package.caching.cache-lite.intro.usage.output"> <title>コア</title> <para> しかしながら、単一文字変数で全てのページコンテンツを復元することは常に可能ではありません。Cache_Lite_Output は、このようにして私たちの助けになります : <programlisting role="php"> <![CDATA[ <?php require_once('Cache/Lite/Output.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 10 ); $cache = new Cache_Lite_Output($options); if (!($cache->start('123'))) { // Cache missed... for($i=0;$i<1000;$i++) { // Making of the page... echo('0123456789'); } $cache->end(); } ?> ]]> </programlisting> </para> <para> この考えは、ブロック毎のキャッシュの使用法と同じです : <programlisting role="php"> <![CDATA[ <?php require_once('Cache/Lite/Output.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 10 ); $cache = new Cache_Lite_Output($options); if (!($cache->start('block1'))) { // キャッシュミス ... echo('Data of the block 1 !'); $cache->end(); } echo('Non cached line !'); if (!($cache->start('block2'))) { // キャッシュミス ... echo('Data of the block 2 !'); $cache->end(); } ?> ]]> </programlisting> </para> </refsect2> <refsect2 id="package.caching.cache-lite.intro.usage.important"> <title>非常に重要なコメント</title> <para> Cache_Lite を使って最大限の効果を得るためには、 あなたのページで機械的に他のパッケージを include しないようにしてください。 条件付きの include を使用していることでページがキャッシュされていない (そして、再計算しなければならない) 場合、必要なモジュール <emphasis>だけ</emphasis> をロードするようにしてください。 </para> <para> <emphasis>良くない</emphasis> 方法 : <programlisting role="php"> <![CDATA[ <?php require_once("Cache/Lite.php"); require_once("...") require_once("...") // (...) $cache = new Cache_Lite(); if ($data = $Cache_Lite->get($id)) { // キャッシュがヒットした ! echo($data); } else { // $data にページデータを(再)構築する必要がある // (...) $Cache_Lite->save($data); } ?> ]]> </programlisting> </para> <para> こちらはよい方法です (通常2倍早くなります) 。 <programlisting role="php"> <![CDATA[ <?php require_once("Cache/Lite.php"); // (...) $cache = new Cache_Lite(); if ($data = $Cache_Lite->get($id)) { // キャッシュがヒットした ! echo($data); } else { // $data にページデータを(再)構築する必要がある require_once("...") require_once("...") // (...) $Cache_Lite->save($data); } ?> ]]> </programlisting> </para> </refsect2> </refsect1> <refsect1 id="package.caching.cache-lite.intro.conclusion"> <title>結論</title> <para> Cache_Lite をもっと知りたいなら、 パッケージに付属している例と技術的な詳細を参照してください。 </para> </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/ja/package/caching/cache-lite/cache-lite/cache_lite.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/cache_lite.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/cache_lite.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.cache-lite"> <refnamediv> <refname>constructor <function>Cache_Lite::Cache_Lite</function></refname> <refpurpose>コンストラクタ</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void constructor <function>Cache_Lite::Cache_Lite</function></funcdef> <paramdef>array <parameter> <optional>$options = array(NULL)</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.cache-lite.desc"> &title.desc; <para> Cache_Lite コアクラスのコンストラクタです。 様々なオプションを設定するために、 引数として連想配列を与えることができます。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.cache-lite.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.array; <parameter>$options</parameter> </term> <listitem> <para> 様々なオプションを設定するための連想配列を指定します。 </para> </listitem> </varlistentry> </variablelist> </para> <para> <table> <title></title> <tgroup cols="4"> <thead> <row> <entry>オプション</entry> <entry>データ型</entry> <entry>デフォルト値</entry> <entry>詳細</entry> </row> </thead> <tbody> <row> <entry> cacheDir </entry> <entry> &type.string; </entry> <entry> /tmp/ </entry> <entry> キャッシュファイルを配置するディレクトリ (末尾はスラッシュ) を指定します </entry> </row> <row> <entry> caching </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> キャッシュの有効/無効を指定します </entry> </row> <row> <entry> lifeTime </entry> <entry> &type.int; </entry> <entry> 3600 </entry> <entry> キャッシュ生存期間を秒単位で指定します </entry> </row> <row> <entry> fileLocking </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> ファイルロックの有効/無効を指定します (悪条件下でのキャッシュ汚染を回避することができます) </entry> </row> <row> <entry> writeControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> 書き込み制御の有効/無効を指定します (書き込み制御を有効にすると、 キャッシュの書き込みが若干遅くなります。 しかし、読み込み・書き込み制御を行わない場合、 いくつかのキャッシュ汚染ファイルが検出されますが、 完全な制御ではありません) </entry> </row> <row> <entry> readControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> 読み込み制御の有効/無効を指定します (有効な場合、制御キーがキャッシュファイルに埋め込まれ、 このキーが読み込み後計算されたキーと比較されます) </entry> </row> <row> <entry> readControlType </entry> <entry> &type.string; </entry> <entry> crc32 </entry> <entry> 読み込み制御のタイプを指定します (読み込み制御が有効な場合のみ)。 'md5' (md5 ハッシュ制御 (最良ですが最遅))、 'crc32' (crc32 ハッシュ制御 (若干安全性に欠けますが高速))、 あるいは 'strlen' (長さのテストだけ (最速)) のいずれかである必要があります。 </entry> </row> <row> <entry> pearErrorMode </entry> <entry> &type.int; </entry> <entry> CACHE_LITE_ERROR_RETURN </entry> <entry> PEAR エラーモード (raiseError がコールされた場合) を指定します (CACHE_LITE_ERROR_RETURN は PEAR_Error オブジェクトを返します。 CACHE_LITE_ERROR_DIE はスクリプトを即時停止します (デバッグに便利です)) 。 </entry> </row> <row> <entry> fileNameProtection </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> ファイル名を保護するかどうかを指定します (もし true なら、あなたは全てのキャッシュ ID やグループ名を使用することができます。もし false なら、 高速ですが、ID やグループ名はキャッシュファイル名が直接使用されますので、 特殊文字などに気を付けてください) 。 </entry> </row> <row> <entry> automaticSerialization </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> 自動シリアライズの有効/無効を指定します (データを文字列ではない形式で直接保存するために使用されますが、 動作は遅くなります) 。 </entry> </row> <row> <entry> memoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [ベータ品質] "メモリキャッシング" の有効/無効を指定します (NB : メモリキャッシングには生存期間はなく、 スクリプトの終了だけがあります) 。 </entry> </row> <row> <entry> onlyMemoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [ベータ品質] "メモリキャッシングのみ" の有効/無効を指定します (もし有効な場合、ファイルは使用されません) 。 </entry> </row> <row> <entry> memoryCachingLimit </entry> <entry> &type.int; </entry> <entry> 1000 </entry> <entry> [ベータ品質] メモリキャッシュにストアするレコードの最大数を指定します </entry> </row> <row> <entry> automaticCleaningFactor </entry> <entry> &type.int; </entry> <entry> 0 </entry> <entry> [1.4.0beta1 以降] 自動クリーニングプロセスの無効/設定を指定します。 自動クリーニングプロセスは、新しいキャッシュファイルを書き込むとき (与えられた生存期間に対して) 古くなったキャッシュファイルを削除します。 0 は "自動的にキャッシュクリーニングしない" という意味です。 1 は "機械的にキャッシュクリーニングする" という意味 (遅い) で、 x>1 は "x 個のキャッシュを書き込んだ場合に 1 回、 ランダムで自動的にクリーニングする" を意味します。 20 から 200 の間の値が最初の値として良いかも知れません。 </entry> </row> <row> <entry> hashedDirectoryLevel </entry> <entry> &type.int; </entry> <entry> 0 </entry> <entry> [1.4.0beta1 以降] ハッシュ化されたディレクトリ構造のレベルを設定します。 0 は "ハッシュ化されたディレクトリ構造を使用しない" という意味で、 1 は "1 レベルのディレクトリ"、 2 は "2 レベルのディレクトリ" を意味します。 このオプションは、何千ものキャッシュファイルがある場合にのみ Cache_Lite を高速化する事ができます。 明確なベンチマークのみ、完璧な値を選択する手助けになります。 1 あるいは 2が最初の値として良いでしょう。 </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.cache-lite.throws"> &title.throws; <para> <emphasis>throws</emphasis> 投げられる例外はありません </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.cache-lite.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.cache-lite.example"> &title.example; <example> <title>最も一般的なオプションを使用する</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite.php"; $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 7200, 'pearErrorMode' => CACHE_LITE_ERROR_DIE ); $cache = Cache_Lite($options); ?> ]]> </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/ja/package/caching/cache-lite/cache-lite/clean.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/clean.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/clean.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.clean"> <refnamediv> <refname><function>Cache_Lite::clean</function></refname> <refpurpose>キャッシュをクリアする</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Cache_Lite::clean</function></funcdef> <paramdef>string <parameter> <optional>$group = &false;</optional></parameter></paramdef> <paramdef>string <parameter> <optional>$mode = 'ingroup';</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.clean.desc"> &title.desc; <para> グループが指定されない場合、全てのキャッシュファイルが削除されます ; または、指定されたグループのキャッシュファイルだけが削除されます。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.clean.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$mode</parameter> </term> <listitem> <para> [1.4.0beta1 以降] キャッシュをフラッシュするモードを指定します : 'old' (現在の生存期間に対して古すぎるキャッシュファイルをクリアします) 、 'ingroup' (与えられたグループの全てのキャッシュファイルをクリアします) 、 'notingroup' (与えられたグループ以外のキャッシュファイルをクリアします) 。 </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.clean.returns"> &title.returns; <para> <emphasis>returns</emphasis> 問題がなければ true </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.clean.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.clean.example"> &title.example; <example> <title>classical using</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite.php"; $options = array('cacheDir' => '/tmp/'); $cache = Cache_Lite($options); $cache->clean(); ?> ]]> </programlisting> </example> <para> この例は全てのキャッシュファイルをクリアします。 </para> </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/ja/package/caching/cache-lite/cache-lite/get.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/get.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/get.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.get"> <refnamediv> <refname><function>Cache_Lite::get</function></refname> <refpurpose>キャッシュが有効かどうかをテストし、(有効であれば) それを返す</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Cache_Lite::get</function></funcdef> <paramdef>string <parameter>$id</parameter></paramdef> <paramdef>string <parameter> <optional>$group = 'default'</optional></parameter></paramdef> <paramdef>boolean <parameter> <optional>$doNotTestCacheValidity = &false;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.get.desc"> &title.desc; <para> Cache_Lite の主なメソッドの1つです : キャッシュファイルが有効かどうかをテストし、 有効であればそれを返します (さもなければ &false;) 。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.get.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$id</parameter> </term> <listitem> <para> キャッシュIDを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.bool; <parameter>$doNotTestCacheValidity</parameter> </term> <listitem> <para> もし &true; を指定した場合、キャッシュの正当性はテストされません。 </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.get.returns"> &title.returns; <para> <emphasis>returns</emphasis> キャッシュデータ (あるいは、有効なキャッシュがない場合 false) </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.get.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.get.example"> &title.example; <example> <title>典型的な使用法</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite.php"; $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 7200, 'pearErrorMode' => CACHE_LITE_ERROR_DIE ); $cache = Cache_Lite($options); if ($data = $cache->get('id_of_the_page')) { // キャッシュがヒットした ! // コンテンツは $data に入っています // (...) } else { // 有効なキャッシュが見つからなかった (このページを生成し保存する必要がある) // (...) } ?> ]]> </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/ja/package/caching/cache-lite/cache-lite/getmemorycachingstate.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/getmemorycachingstate.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/getmemorycachingstate.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.getmemorycachingstate"> <refnamediv> <refname><function>Cache_Lite::getMemoryCachingState</function></refname> <refpurpose></refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Cache_Lite::getMemoryCachingState</function></funcdef> <paramdef>string <parameter>$id</parameter></paramdef> <paramdef>string <parameter> <optional>$group = 'default'</optional></parameter></paramdef> <paramdef>bool <parameter> <optional>$doNotTestCacheValidity = &false;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.getmemorycachingstate.desc"> &title.desc; <para> [ベータ品質] 典型的なキャッシュファイルから 以前に保存したメモリキャッシングの配列の状態をロードします。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.getmemorycachingstate.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$id</parameter> </term> <listitem> <para> キャッシュIDを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.bool; <parameter>$doNotTestCacheValidity</parameter> </term> <listitem> <para> もし &true; を指定した場合、キャッシュの正当性はテストされません。 </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.getmemorycachingstate.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/ja/package/caching/cache-lite/cache-lite/lastmodified.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/lastmodified.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/lastmodified.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.lastmodified"> <refnamediv> <refname><function>Cache_Lite::lastModified</function></refname> <refpurpose>キャッシュの最終更新時間を返す</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>int <function>Cache_Lite::lastModified</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.lastmodified.desc"> &title.desc; <para>[CACHE_LITE ハッカーのためだけ] キャッシュの最終更新時間を返します。</para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.lastmodified.returns"> &title.returns; <para> <emphasis>returns</emphasis> 最終更新時間 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.lastmodified.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/ja/package/caching/cache-lite/cache-lite/raiseerror.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/raiseerror.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/raiseerror.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.raiseerror"> <refnamediv> <refname><function>Cache_Lite::raiseError</function></refname> <refpurpose>PEAR エラーを引き起こす</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Cache_Lite::raiseError</function></funcdef> <paramdef>string <parameter>$msg</parameter></paramdef> <paramdef>int <parameter>$code</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.raiseerror.desc"> &title.desc; <para> 動的に PEAR.php を取り込み、PEAR エラーを引き起こします。 </para> <para> パフォーマンス改善のため、PEAR.php ファイルは動的に取り込まれます。 つまり、このファイルはエラーを引き起こす時のみ取り込まれます。 そのため、ほとんどの場合、このファイルは取り込まれず、 パフォーマンスはより良くなります。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.raiseerror.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$msg</parameter> </term> <listitem> <para> エラーメッセージを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.int; <parameter>$code</parameter> </term> <listitem> <para> エラーコードを指定します </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.raiseerror.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/ja/package/caching/cache-lite/cache-lite/remove.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/remove.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/remove.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.remove"> <refnamediv> <refname><function>Cache_Lite::remove</function></refname> <refpurpose>キャッシュファイルを削除する</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Cache_Lite::remove</function></funcdef> <paramdef>string <parameter>$id</parameter></paramdef> <paramdef>string <parameter> <optional>$group = 'default'</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.remove.desc"> &title.desc; <para> 与えられたキャッシュファイル (ID とグループで識別される) を削除します。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.remove.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$id</parameter> </term> <listitem> <para> キャッシュIDを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.remove.returns"> &title.returns; <para> <emphasis>returns</emphasis> 問題がなければ true </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.remove.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.remove.example"> &title.example; <example> <title>典型的な使用法</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite.php"; $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 7200, 'pearErrorMode' => CACHE_LITE_ERROR_DIE ); $cache = new Cache_Lite($options); $cache->remove('id_of_the_page'); if ($data = $cache->get('id_of_the_page')) { // キャッシュがヒットした ! // [あり得ない !] } else { // 有効なキャッシュが見つからなかった (このページを生成し保存する必要がある) $data = '<html><head><title>test</title></head><body><p>this is a test</p></body></html>'; $cache->save($data); } ?> ]]> </programlisting> </example> <para> これはダミーの例です。 なぜなら、キャッシュがスクリプトの最初で削除されているからです ! そのため、if 文の最初のケースはあり得ません。 </para> </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/ja/package/caching/cache-lite/cache-lite/save.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/save.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/save.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.save"> <refnamediv> <refname><function>Cache_Lite::save</function></refname> <refpurpose>キャッシュファイルにデータを保存する</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Cache_Lite::save</function></funcdef> <paramdef>string <parameter>$data</parameter></paramdef> <paramdef>string <parameter> <optional>$id = NULL</optional></parameter></paramdef> <paramdef>string <parameter> <optional>$group = 'default'</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.save.desc"> &title.desc; <para> 与えられたデータを保存します (もし automaticSerialization が &false; (デフォルト) の場合、文字列でなければなりません) 。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.save.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$data</parameter> </term> <listitem> <para> キャッシュファイルに保存するためのデータを指定します (automaticSerialization が &false; (デフォルト) の場合、文字列以外の型にすることはできません) </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$id</parameter> </term> <listitem> <para> キャッシュIDを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.save.returns"> &title.returns; <para> <emphasis>returns</emphasis> 問題がなければ true </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.save.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.save.example"> &title.example; <example> <title>典型的な使用法</title> <programlisting role="php"> <![CDATA[ <?php require_once "Cache/Lite.php"; $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 7200, 'pearErrorMode' => CACHE_LITE_ERROR_DIE ); $cache = Cache_Lite($options); if ($data = $cache->get('id_of_the_page')) { // キャッシュがヒットした ! // コンテンツは $data に入っている echo($data); } else { // 有効なキャッシュが見つからなかった (このページを生成し保存する必要がある) $data = '<html><head><title>test</title></head><body><p>this is a test</p></body></html>'; $cache->save($data); } ?> ]]> </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/ja/package/caching/cache-lite/cache-lite/savememorycachingstate.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/savememorycachingstate.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/savememorycachingstate.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.savememorycachingstate"> <refnamediv> <refname><function>Cache_Lite::saveMemoryCachingState</function></refname> <refpurpose></refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Cache_Lite::saveMemoryCachingState</function></funcdef> <paramdef>string <parameter>$id</parameter></paramdef> <paramdef>string <parameter> <optional>$group = 'default'</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.savememorycachingstate.desc"> &title.desc; <para> [ベータ品質] メモリキャッシングの配列の状態を典型的なキャッシュファイルに保存します。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.savememorycachingstate.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$id</parameter> </term> <listitem> <para> キャッシュIDを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.savememorycachingstate.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/ja/package/caching/cache-lite/cache-lite/setlifetime.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/setlifetime.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/setlifetime.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.setlifetime"> <refnamediv> <refname><function>Cache_Lite::setLifeTime</function></refname> <refpurpose>新しい生存期間を設定する</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Cache_Lite::setLifeTime</function></funcdef> <paramdef>int <parameter>$newLifeTime</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.setlifetime.desc"> &title.desc; <para> キャッシュの生存期間を変更します。 </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.setlifetime.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$newLifeTime</parameter> </term> <listitem> <para> 新しい生存期間 (秒) を指定します。 </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.setlifetime.throws"> &title.throws; <para> <emphasis>throws</emphasis> 投げられる例外はありません </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.setlifetime.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/ja/package/caching/cache-lite/cache-lite/settodebug.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite/settodebug.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite/settodebug.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.caching.cache-lite.cache-lite.settodebug"> <refnamediv> <refname><function>Cache_Lite::setToDebug</function></refname> <refpurpose>デバッグモードを設定する</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;Lite.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Cache_Lite::setToDebug</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.caching.cache-lite.cache-lite.settodebug.desc"> &title.desc; <para>エラーが発見された時、スクリプトが停止しメッセージが表示されます (デバッグモードの場合だけ) ; コンストラスタで pearErrorMode オプションを指定するのと同じ効果があります</para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite.settodebug.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/ja/package/caching/cache-lite/cache-lite-function/cache_lite_function.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite-function/cache_lite_function.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite-function/cache_lite_function.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.default.cache-lite.cache-lite-function.cache-lite-function"> <refnamediv> <refname>constructor <function>Cache_Lite_Function::Cache_Lite_Function</function></refname> <refpurpose>コンストラクタ</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;LiteFunction.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>void constructor <function>Cache_Lite_Function::Cache_Lite_Function</function></funcdef> <paramdef>array <parameter> <optional>$options = array(NULL)</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.cache-lite.cache-lite-function.cache-lite-function.desc"> &title.desc; <para> Cache_Lite_Output クラスのコンストラクタです。 様々なオプションを設定するために、 引数として連想配列を与えることができます。</para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-function.cache-lite-function.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.array; <parameter>$options</parameter> </term> <listitem> <para> オプションを指定します </para> </listitem> </varlistentry> </variablelist> </para> <para> <table> <title></title> <tgroup cols="4"> <thead> <row> <entry>オプション</entry> <entry>データ型</entry> <entry>デフォルト値</entry> <entry>詳細</entry> </row> </thead> <tbody> <row> <entry> cacheDir </entry> <entry> &type.string; </entry> <entry> /tmp/ </entry> <entry> キャッシュファイルを配置するディレクトリ (末尾はスラッシュ) を指定します </entry> </row> <row> <entry> caching </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> キャッシュの有効/無効を指定します </entry> </row> <row> <entry> lifeTime </entry> <entry> &type.int; </entry> <entry> 3600 </entry> <entry> キャッシュ生存期間を秒単位で指定します </entry> </row> <row> <entry> fileLocking </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> ファイルロックの有効/無効を指定します (悪条件下でのキャッシュ汚染を回避することができます) </entry> </row> <row> <entry> writeControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> 書き込み制御の有効/無効を指定します (書き込み制御を有効にすると、 キャッシュの書き込みが若干遅くなります。 しかし、読み込み・書き込み制御を行わない場合、 いくつかのキャッシュ汚染ファイルが検出されますが、 完全な制御ではありません) </entry> </row> <row> <entry> readControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> 読み込み制御の有効/無効を指定します (有効な場合、制御キーがキャッシュファイルに埋め込まれ、 このキーが読み込み後計算されたキーと比較されます) </entry> </row> <row> <entry> readControlType </entry> <entry> &type.string; </entry> <entry> crc32 </entry> <entry> 読み込み制御のタイプを指定します (読み込み制御が有効な場合のみ)。 'md5' (md5 ハッシュ制御 (最良ですが最遅))、 'crc32' (crc32 ハッシュ制御 (若干安全性に欠けますが高速))、 あるいは 'strlen' (長さのテストだけ (最速)) のいずれかである必要があります。 </entry> </row> <row> <entry> pearErrorMode </entry> <entry> &type.int; </entry> <entry> CACHE_LITE_ERROR_RETURN </entry> <entry> PEAR エラーモード (raiseError がコールされた場合) を指定します (CACHE_LITE_ERROR_RETURN は PEAR_Error オブジェクトを返します。 CACHE_LITE_ERROR_DIE はスクリプトを即時停止します (デバッグに便利です)) 。 </entry> </row> <row> <entry> fileNameProtection </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> ファイル名を保護するかどうかを指定します (もし true なら、あなたは全てのキャッシュ ID やグループ名を使用することができます。もし false なら、 高速ですが、ID やグループ名はキャッシュファイル名が直接使用されますので、 特殊文字などに気を付けてください) 。 </entry> </row> <row> <entry> automaticSerialization </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> 自動シリアライズの有効/無効を指定します (データを文字列ではない形式で直接保存するために使用されますが、 動作は遅くなります) 。 </entry> </row> <row> <entry> memoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [ベータ品質] "メモリキャッシング" の有効/無効を指定します (NB : メモリキャッシングには生存期間はなく、 スクリプトの終了だけがあります) 。 </entry> </row> <row> <entry> onlyMemoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [ベータ品質] "メモリキャッシングのみ" の有効/無効を指定します (もし有効な場合、ファイルは使用されません) 。 </entry> </row> <row> <entry> memoryCachingLimit </entry> <entry> &type.int; </entry> <entry> 1000 </entry> <entry> [ベータ品質] メモリキャッシュにストアするレコードの最大数を指定します </entry> </row> <row> <entry> defaultGroup </entry> <entry> &type.string; </entry> <entry> Cache_Lite_Function </entry> <entry> 関数キャッシングのためのデフォルトキャッシュグループを指定します </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-function.cache-lite-function.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/ja/package/caching/cache-lite/cache-lite-function/call.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite-function/call.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite-function/call.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: shimooka Status: ready --> <refentry id="package.default.cache-lite.cache-lite-function.call"> <refnamediv> <refname><function>Cache_Lite_Function::call</function></refname> <refpurpose>キャッシュ可能な関数あるいはメソッドをコールする (あるいはすでにキャッシュされている場合はコールしない)</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;LiteFunction.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Cache_Lite_Function::call</function></funcdef> <paramdef>string<parameter>$functionName</parameter></paramdef> <paramdef>mixed<parameter>$arg1</parameter></paramdef> <paramdef>mixed<parameter>$arg2</parameter></paramdef> <paramdef>mixed<parameter>$arg3</parameter></paramdef> <paramdef>mixed<parameter>...</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.default.cache-lite.cache-lite-function.call.desc"> &title.desc; <para> もしキャッシュがなければ、引数と共に与えられた関数をコールします ; もしくは、関数の出力がキャッシュから読み込まれた場合はブラウザに送信し、 また、値がキャッシュから読み込まれ返された場合、その値を返します。 </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-function.call.returns"> &title.returns; <para> <emphasis>returns</emphasis> 関数/メソッドの結果 </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-function.call.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite-function.call.example1"> &title.example; <example> <title>典型的な関数の使用法</title> <programlisting role="php"> <![CDATA[ <?php require_once('Cache/Lite/Function.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 3600 ); $cache = new Cache_Lite_Function($options); $cache->call('function_to_bench', 12, 45); function function_to_bench($arg1, $arg2) { echo "This is the output of the function function_to_bench($arg1, $arg2) !<br>"; return "This is the result of the function function_to_bench($arg1, $arg2) !<br>"; } ?> ]]> </programlisting> </example> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite-function.call.example2"> &title.example; <example> <title>典型的なメソッドの使用法</title> <programlisting role="php"> <![CDATA[ <?php require_once('Cache/Lite/Function.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 3600 ); $cache = new Cache_Lite_Function($options); $obj = new bench(); $obj->test = 666; $cache->call('obj->method_to_bench', 12, 45); class bench { var $test; function method_to_bench($arg1, $arg2) { echo "\$obj->test = $this->test and this is the output of the method \$obj->method_to_bench($arg1, $arg2) !<br>"; return "\$obj->test = $this->test and this is the result of the method \$obj->method_to_bench($arg1, $arg2) !<br>"; } } ?> ]]> </programlisting> </example> <para> もし、Cache_Lite_Function で $this オブジェクト (例えば $cache->call('this->method',...) を使用したい場合、 まずこちらを参照してください : <ulink url="http://pear.php.net/bugs/bug.php?id=660">バグ</ulink> </para> </refsect1> <refsect1 id="package.caching.cache-lite.cache-lite-function.call.example3"> &title.example; <example> <title>典型的な静的メソッドの使用法</title> <programlisting role="php"> <![CDATA[ <?php require_once('Cache/Lite/Function.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 3600 ); $cache = new Cache_Lite_Function($options); $cache->call('bench::static_method_to_bench', 12, 45); class bench { var $test; function static_method_to_bench($arg1, $arg2) { echo "This is the output of the function static_method_to_bench($arg1, $arg2) !<br>"; return "This is the result of the function static_method_to_bench($arg1, $arg2) !<br>"; } } ?> ]]> </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/ja/package/caching/cache-lite/cache-lite-output/cache_lite_output.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite-output/cache_lite_output.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite-output/cache_lite_output.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <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>コンストラクタ</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>Cache_Lite_Output クラスのコンストラクタです。 様々なオプションを設定するために、 引数として連想配列を与えることができます。</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> 様々なオプションを設定するための連想配列を指定します。 </para> </listitem> </varlistentry> </variablelist> </para> <para> <table> <title></title> <tgroup cols="4"> <thead> <row> <entry>オプション</entry> <entry>データ型</entry> <entry>デフォルト値</entry> <entry>詳細</entry> </row> </thead> <tbody> <row> <entry> cacheDir </entry> <entry> &type.string; </entry> <entry> /tmp/ </entry> <entry> キャッシュファイルを配置するディレクトリ (末尾はスラッシュ) を指定します </entry> </row> <row> <entry> caching </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> キャッシュの有効/無効を指定します </entry> </row> <row> <entry> lifeTime </entry> <entry> &type.int; </entry> <entry> 3600 </entry> <entry> キャッシュ生存期間を秒単位で指定します </entry> </row> <row> <entry> fileLocking </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> ファイルロックの有効/無効を指定します (悪条件下でのキャッシュ汚染を回避することができます) </entry> </row> <row> <entry> writeControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> 書き込み制御の有効/無効を指定します (書き込み制御を有効にすると、 キャッシュの書き込みが若干遅くなります。 しかし、読み込み・書き込み制御を行わない場合、 いくつかのキャッシュ汚染ファイルが検出されますが、 完全な制御ではありません) </entry> </row> <row> <entry> readControl </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> 読み込み制御の有効/無効を指定します (有効な場合、制御キーがキャッシュファイルに埋め込まれ、 このキーが読み込み後計算されたキーと比較されます) </entry> </row> <row> <entry> readControlType </entry> <entry> &type.string; </entry> <entry> crc32 </entry> <entry> 読み込み制御のタイプを指定します (読み込み制御が有効な場合のみ)。 'md5' (md5 ハッシュ制御 (最良ですが最遅))、 'crc32' (crc32 ハッシュ制御 (若干安全性に欠けますが高速))、 あるいは 'strlen' (長さのテストだけ (最速)) のいずれかである必要があります。 </entry> </row> <row> <entry> pearErrorMode </entry> <entry> &type.int; </entry> <entry> CACHE_LITE_ERROR_RETURN </entry> <entry> PEAR エラーモード (raiseError がコールされた場合) を指定します (CACHE_LITE_ERROR_RETURN は PEAR_Error オブジェクトを返します。 CACHE_LITE_ERROR_DIE はスクリプトを即時停止します (デバッグに便利です)) 。 </entry> </row> <row> <entry> fileNameProtection </entry> <entry> &type.bool; </entry> <entry> &true; </entry> <entry> ファイル名を保護するかどうかを指定します (もし true なら、あなたは全てのキャッシュ ID やグループ名を使用することができます。もし false なら、 高速ですが、ID やグループ名はキャッシュファイル名が直接使用されますので、 特殊文字などに気を付けてください) 。 </entry> </row> <row> <entry> automaticSerialization </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> 自動シリアライズの有効/無効を指定します (データを文字列ではない形式で直接保存するために使用されますが、 動作は遅くなります) 。 </entry> </row> <row> <entry> memoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [ベータ品質] "メモリキャッシング" の有効/無効を指定します (NB : メモリキャッシングには生存期間はなく、 スクリプトの終了だけがあります) 。 </entry> </row> <row> <entry> onlyMemoryCaching </entry> <entry> &type.bool; </entry> <entry> &false; </entry> <entry> [ベータ品質] "メモリキャッシングのみ" の有効/無効を指定します (もし有効な場合、ファイルは使用されません) 。 </entry> </row> <row> <entry> memoryCachingLimit </entry> <entry> &type.int; </entry> <entry> 1000 </entry> <entry> [ベータ品質] メモリキャッシュにストアするレコードの最大数を指定します </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/ja/package/caching/cache-lite/cache-lite-output/end.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite-output/end.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite-output/end.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready --> <refentry id="package.default.cache-lite.cache-lite-output.end"> <refnamediv> <refname><function>Cache_Lite_Output::end</function></refname> <refpurpose>start() メソッドで開始された出力バッファリングを停止し、出力をキャッシュファイルに保存する</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> start() メソッドで開始された出力バッファリングを停止し、出力をキャッシュファイルに保存します。 </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'))) { // キャッシュがヒットしなかった ! // 全ての出力は end() メソッドまでバッファされる // (...) $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 --> http://cvs.php.net/co.php/peardoc/ja/package/caching/cache-lite/cache-lite-output/start.xml?r=1.1&p=1 Index: peardoc/ja/package/caching/cache-lite/cache-lite-output/start.xml +++ peardoc/ja/package/caching/cache-lite/cache-lite-output/start.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: shimooka Status: ready --> <refentry id="package.default.cache-lite.cache-lite-output.start"> <refnamediv> <refname><function>Cache_Lite_Output::start</function></refname> <refpurpose>キャッシュが有効かどうかをテストし、(有効であれば) ブラウザにそれを返す。あるいは出力バッファリングが有効になる</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> キャッシュが有効かどうかをテストし、(有効であれば) ブラウザにそれを返します。あるいは出力バッファリングが有効になります。 </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> キャッシュIDを指定します </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$group</parameter> </term> <listitem> <para> キャッシュグループ名を指定します </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.default.cache-lite.cache-lite-output.start.returns"> &title.returns; <para> <emphasis>returns</emphasis> キャッシュがヒットすれば true (そうでなければ false) </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 = new Cache_Lite_Output($options); if (!($cache->start('id_of_the_page'))) { // キャッシュがヒットしなかった ! // 全ての出力は end() メソッドまでバッファされる // (...) $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 (#5937) next »