previousTranslation2_Decorator_CacheLiteFunction クラス概要 (Previous) (Next) Translation2_Decorator_DefaultText クラス概要next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Translation2_Decorator_CacheMemory クラス概要

Translation2_Decorator_CacheMemory クラス概要 – 取得したデータをメモリにキャッシュするデコレータ

CacheMemory デコレータの例

このデコレータは、データをメモリにキャッシュします。 複数リクエスト間でキャッシュが持続することは「ありません」。 現在実行中のスクリプト内においてのみ有効です。 ネットワークの読み込みを少なくしたい場合には prefetch をオフにします (しかし、こうするとデータベースに対するクエリの数が増えます)。

<?php
$tr 
= new Translation2($driver$dbinfo$params);
$tr =& $tr->getDecorator('CacheMemory');
$tr->setOption('prefetch'true); // デフォルト値は true です
?>

previousTranslation2_Decorator_CacheLiteFunction クラス概要 (Previous) (Next) Translation2_Decorator_DefaultText クラス概要next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.