|
|
@@ -1,6 +1,6 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!-- Reviewed: no -->
|
|
|
-<!-- EN-Revision: 15746 -->
|
|
|
+<!-- EN-Revision: 15750 -->
|
|
|
<sect1 id="zend.cache.frontends">
|
|
|
<title><classname>Zend_Cache</classname> のフロントエンド</title>
|
|
|
|
|
|
@@ -71,7 +71,7 @@
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>logging</code></entry>
|
|
|
+ <entry><emphasis>logging</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>FALSE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -80,7 +80,7 @@
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>write_control</code></entry>
|
|
|
+ <entry><emphasis>write_control</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>TRUE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -93,7 +93,7 @@
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>automatic_serialization</code></entry>
|
|
|
+ <entry><emphasis>automatic_serialization</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>FALSE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -103,9 +103,9 @@
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>automatic_cleaning_factor</code></entry>
|
|
|
- <entry><code>int</code></entry>
|
|
|
- <entry><code>10</code></entry>
|
|
|
+ <entry><emphasis>automatic_cleaning_factor</emphasis></entry>
|
|
|
+ <entry><type>Integer</type></entry>
|
|
|
+ <entry>10</entry>
|
|
|
<entry>
|
|
|
自動クリーンアッププロセス (ガベージコレクタ) の設定を行います。
|
|
|
0 を指定すると、自動キャッシュクリーニングを行いません。
|
|
|
@@ -116,7 +116,7 @@
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>ignore_user_abort</code></entry>
|
|
|
+ <entry><emphasis>ignore_user_abort</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>FALSE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -250,8 +250,8 @@ if (!($cache->test($id))) {
|
|
|
<para>
|
|
|
<classname>Zend_Cache_Frontend_Output</classname> は、出力を横取りするフロントエンドです。
|
|
|
これは PHP の出力バッファリング処理を使いやすくしたもので、
|
|
|
- <code>start()</code> メソッドと
|
|
|
- <code>end()</code> メソッドの間の出力を横取りします。
|
|
|
+ <methodname>start()</methodname> メソッドと
|
|
|
+ <methodname>end()</methodname> メソッドの間の出力を横取りします。
|
|
|
</para>
|
|
|
</sect3>
|
|
|
<sect3 id="zend.cache.frontends.output.options">
|
|
|
@@ -294,7 +294,7 @@ echo 'これはキャッシュされません ('.time().').';
|
|
|
<title>導入</title>
|
|
|
<para>
|
|
|
<classname>Zend_Cache_Frontend_Function</classname> は、関数コールの結果をキャッシュします。
|
|
|
- <code>call()</code> というメソッドを保持しており、
|
|
|
+ <methodname>call()</methodname> というメソッドを保持しており、
|
|
|
関数名とパラメータを配列にしてこのメソッドに渡します。
|
|
|
</para>
|
|
|
</sect3>
|
|
|
@@ -313,7 +313,7 @@ echo 'これはキャッシュされません ('.time().').';
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<row>
|
|
|
- <entry><code>cache_by_default</code></entry>
|
|
|
+ <entry><emphasis>cache_by_default</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>TRUE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -321,7 +321,7 @@ echo 'これはキャッシュされません ('.time().').';
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>cached_functions</code></entry>
|
|
|
+ <entry><emphasis>cached_functions</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
<entry></entry>
|
|
|
<entry>
|
|
|
@@ -329,7 +329,7 @@ echo 'これはキャッシュされません ('.time().').';
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>non_cached_functions</code></entry>
|
|
|
+ <entry><emphasis>non_cached_functions</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
<entry></entry>
|
|
|
<entry>
|
|
|
@@ -344,8 +344,8 @@ echo 'これはキャッシュされません ('.time().').';
|
|
|
<sect3 id="zend.cache.frontends.function.examples">
|
|
|
<title>例</title>
|
|
|
<para>
|
|
|
- <code>call()</code> 関数の使用法は、PHP の
|
|
|
- <code>call_user_func_array()</code> と同じです。
|
|
|
+ <methodname>call()</methodname> 関数の使用法は、PHP の
|
|
|
+ <methodname>call_user_func_array()</methodname> と同じです。
|
|
|
</para>
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
$cache->call('veryExpensiveFunc', $params);
|
|
|
@@ -359,9 +359,9 @@ $cache->call('veryExpensiveFunc', $params);
|
|
|
関数の返り値だけでなく関数内部での出力もキャッシュします。
|
|
|
</para>
|
|
|
<note><para>
|
|
|
- <code>array()</code>、<code>echo()</code>、<code>empty()</code>、<code>eval()</code>、
|
|
|
- <code>exit()</code>、<code>isset()</code>、<code>list()</code>、<code>print()</code>
|
|
|
- および <code>unset()</code> 以外なら、
|
|
|
+ <methodname>array()</methodname>、<methodname>echo()</methodname>、<methodname>empty()</methodname>、<methodname>eval()</methodname>、
|
|
|
+ <methodname>exit()</methodname>、<methodname>isset()</methodname>、<methodname>list()</methodname>、<methodname>print()</methodname>
|
|
|
+ および <methodname>unset()</methodname> 以外なら、
|
|
|
任意の組み込み関数やユーザ定義関数を渡すことができます。
|
|
|
</para></note>
|
|
|
</sect3>
|
|
|
@@ -391,8 +391,8 @@ $cache->call('veryExpensiveFunc', $params);
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<row>
|
|
|
- <entry><code>cached_entity</code> (必須)</entry>
|
|
|
- <entry><code>mixed</code></entry>
|
|
|
+ <entry><emphasis>cached_entity</emphasis> (必須)</entry>
|
|
|
+ <entry><type>Mixed</type></entry>
|
|
|
<entry></entry>
|
|
|
<entry>
|
|
|
クラス名を設定すると、抽象クラスおよびスタティックコールをキャッシュします。
|
|
|
@@ -400,7 +400,7 @@ $cache->call('veryExpensiveFunc', $params);
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>cache_by_default</code></entry>
|
|
|
+ <entry><emphasis>cache_by_default</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>TRUE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -408,7 +408,7 @@ $cache->call('veryExpensiveFunc', $params);
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>cached_methods</code></entry>
|
|
|
+ <entry><emphasis>cached_methods</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
<entry></entry>
|
|
|
<entry>
|
|
|
@@ -416,7 +416,7 @@ $cache->call('veryExpensiveFunc', $params);
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>non_cached_methods</code></entry>
|
|
|
+ <entry><emphasis>non_cached_methods</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
<entry></entry>
|
|
|
<entry>
|
|
|
@@ -516,36 +516,36 @@ $result = $cache->foobar2('1', '2');
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<row>
|
|
|
- <entry><code>master_file (非推奨)</code></entry>
|
|
|
+ <entry><emphasis>master_file (非推奨)</emphasis></entry>
|
|
|
<entry><type>String</type></entry>
|
|
|
- <entry><code></code></entry>
|
|
|
+ <entry>''</entry>
|
|
|
<entry>
|
|
|
マスタファイルへのフルパス。
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>master_files</code></entry>
|
|
|
+ <entry><emphasis>master_files</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
- <entry><code></code></entry>
|
|
|
+ <entry><methodname>array()</methodname></entry>
|
|
|
<entry>
|
|
|
マスタファイル群へのフルパスの配列。
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>master_files_mode</code></entry>
|
|
|
+ <entry><emphasis>master_files_mode</emphasis></entry>
|
|
|
<entry><type>String</type></entry>
|
|
|
<entry><classname>Zend_Cache_Frontend_File::MODE_OR</classname></entry>
|
|
|
<entry>
|
|
|
<classname>Zend_Cache_Frontend_File::MODE_AND</classname> あるいは
|
|
|
<classname>Zend_Cache_Frontend_File::MODE_OR</classname>。
|
|
|
- <code>MODE_AND</code> の場合は、
|
|
|
+ <constant>MODE_AND</cohstant> の場合は、
|
|
|
すべてのマスタファイルにアクセスがあるまでキャッシュが無効化されません。
|
|
|
- <code>MODE_OR</code> の場合は、
|
|
|
+ <constant>MODE_OR</constant> の場合は、
|
|
|
どれかひとつのマスタファイルにアクセスがあればキャッシュを無効化します。
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>ignore_missing_master_files</code></entry>
|
|
|
+ <entry><emphasis>ignore_missing_master_files</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>FALSE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -563,7 +563,7 @@ $result = $cache->foobar2('1', '2');
|
|
|
このフロントエンドの使用法は <classname>Zend_Cache_Core</classname> と同じです。
|
|
|
そのため、特に例は用意していません。唯一しなければならないことは、
|
|
|
ファクトリを使用する際に、バックエンドのオプションとして
|
|
|
- <code>master_file</code> を設定することだけです。
|
|
|
+ <emphasis>master_file</emphasis> を設定することだけです。
|
|
|
</para>
|
|
|
</sect3>
|
|
|
</sect2>
|
|
|
@@ -583,8 +583,8 @@ $result = $cache->foobar2('1', '2');
|
|
|
<varname>$_SERVER['REQUEST_URI']</varname> および (オプションの設定によっては)
|
|
|
<varname>$_GET</varname>、<varname>$_POST</varname>、<varname>$_SESSION</varname>、
|
|
|
<varname>$_COOKIE</varname>、<varname>$_FILES</varname> をもとにして生成されます。
|
|
|
- さらに、ひとつのメソッド (<code>start()</code>) をコールするだけで使用できます。
|
|
|
- <code>end()</code> は、ページの終了時に自動的にコールされます。
|
|
|
+ さらに、ひとつのメソッド (<methodname>start()</methodname>) をコールするだけで使用できます。
|
|
|
+ <methodname>end()</methodname> は、ページの終了時に自動的にコールされます。
|
|
|
</para>
|
|
|
<para>
|
|
|
現時点ではまだ実装されていませんが、将来は HTTP conditional システムを追加する予定です。
|
|
|
@@ -608,7 +608,7 @@ $result = $cache->foobar2('1', '2');
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<row>
|
|
|
- <entry><code>http_conditional</code></entry>
|
|
|
+ <entry><emphasis>http_conditional</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>FALSE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -616,7 +616,7 @@ $result = $cache->foobar2('1', '2');
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>debug_header</code></entry>
|
|
|
+ <entry><emphasis>debug_header</emphasis></entry>
|
|
|
<entry><type>Boolean</type></entry>
|
|
|
<entry><constant>FALSE</constant></entry>
|
|
|
<entry>
|
|
|
@@ -625,93 +625,93 @@ $result = $cache->foobar2('1', '2');
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>default_options</code></entry>
|
|
|
+ <entry><emphasis>default_options</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
- <entry><code>array(...説明を参照ください...)</code></entry>
|
|
|
+ <entry><methodname>array(...説明を参照ください...)</methodname></entry>
|
|
|
<entry>
|
|
|
デフォルトのオプションを表す連想配列です。
|
|
|
<itemizedlist>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは true) cache</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは true) cache</emphasis> :
|
|
|
true の場合はキャッシュが有効になります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは false) cache_with_get_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは false) cache_with_get_variables</emphasis> :
|
|
|
true の場合は、<varname>$_GET</varname> 配列に変数が含まれていてもキャッシュがオンのままになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは false) cache_with_post_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは false) cache_with_post_variables</emphasis> :
|
|
|
true の場合は、<varname>$_POST</varname> 配列に変数が含まれていてもキャッシュがオンのままになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは false) cache_with_session_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは false) cache_with_session_variables</emphasis> :
|
|
|
true の場合は、<varname>$_SESSION</varname> 配列に変数が含まれていてもキャッシュがオンのままになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは false) cache_with_files_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは false) cache_with_files_variables</emphasis> :
|
|
|
true の場合は、<varname>$_FILES</varname> 配列に変数が含まれていてもキャッシュがオンのままになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは false) cache_with_cookie_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは false) cache_with_cookie_variables</emphasis> :
|
|
|
true の場合は、<varname>$_COOKIE</varname> 配列に変数が含まれていてもキャッシュがオンのままになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは true) make_id_with_get_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは true) make_id_with_get_variables</emphasis> :
|
|
|
true の場合は、キャッシュ ID が <varname>$_GET</varname> 配列の内容に依存するようになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは true) make_id_with_post_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは true) make_id_with_post_variables</emphasis> :
|
|
|
true の場合は、キャッシュ ID が <varname>$_POST</varname> 配列の内容に依存するようになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは true) make_id_with_session_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは true) make_id_with_session_variables</emphasis> :
|
|
|
true の場合は、キャッシュ ID が <varname>$_SESSION</varname> 配列の内容に依存するようになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは true) make_id_with_files_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは true) make_id_with_files_variables</emphasis> :
|
|
|
true の場合は、キャッシュ ID が <varname>$_FILES</varname> 配列の内容に依存するようになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(boolean, デフォルトは true) make_id_with_cookie_variables</code> :
|
|
|
+ <emphasis>(boolean, デフォルトは true) make_id_with_cookie_variables</emphasis> :
|
|
|
true の場合は、キャッシュ ID が <varname>$_COOKIE</varname> 配列の内容に依存するようになります。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(int, デフォルトは false) specific_lifetime</code> :
|
|
|
+ <emphasis>(int, デフォルトは false) specific_lifetime</emphasis> :
|
|
|
false でない場合は、選択した正規表現に対して指定した有効期限を使用します。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(配列, デフォルトは array()) tags</code> :
|
|
|
+ <emphasis>(配列, デフォルトは array()) tags</emphasis> :
|
|
|
キャッシュレコード用のタグ。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <code>(int, デフォルトは null) priority</code> :
|
|
|
+ <emphasis>(int, デフォルトは null) priority</emphasis> :
|
|
|
優先度 (バックエンドが優先度をサポートしている場合)。
|
|
|
</para>
|
|
|
</listitem>
|
|
|
@@ -719,9 +719,9 @@ $result = $cache->foobar2('1', '2');
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>regexps</code></entry>
|
|
|
+ <entry><emphasis>regexps</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
- <entry><code>array()</code></entry>
|
|
|
+ <entry><methodname>array()</methodname></entry>
|
|
|
<entry>
|
|
|
特定の REQUEST_URI に対してのみ適用するオプションを設定する連想配列です。
|
|
|
キーが (PCRE の) 正規表現、対応する値は連想配列となります。
|
|
|
@@ -733,9 +733,9 @@ $result = $cache->foobar2('1', '2');
|
|
|
</entry>
|
|
|
</row>
|
|
|
<row>
|
|
|
- <entry><code>memorize_headers</code></entry>
|
|
|
+ <entry><emphasis>memorize_headers</emphasis></entry>
|
|
|
<entry><type>Array</type></entry>
|
|
|
- <entry><code>array()</code></entry>
|
|
|
+ <entry><methodname>array()</methodname></entry>
|
|
|
<entry>
|
|
|
HTTP ヘッダ名に対応する文字列の配列です。
|
|
|
ここにあげられたヘッダがキャッシュデータとともに保存され、
|