Translation2_Decorator クラス概要 (Previous) (Next) Translation2_Decorator_CacheMemory クラス概要

View this page in Last updated: Sun, 20 Jul 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Translation2_Decorator_CacheLiteFunction クラス概要

Translation2_Decorator_CacheLiteFunction クラス概要  -- Cache_Lite_Function クラスを用いて、取得したデータをキャッシュするデコレータ

Cache_Lite_Function デコレータの例

このデコレータは、非常に効率的なキャッシュを提供します。 PEAR::Cache_Lite が必要です。Cache_Lite がサポートするオプション

  • lifeTime [integer]

  • cacheDir [string]

  • fileLocking [boolean]

  • caching [boolean]

をすべてサポートしています。 オプションを直接 Cache_Lite オブジェクトに渡すには、 setCacheOption() を使用します。

<?php
$tr = new Translation2($driver$dbinfo$params);
$tr =& $tr->getDecorator('CacheLiteFunction');
$tr->setOption('cacheDir''/var/tmp/');
$tr->setOption('lifeTime'3600*24*7); // 一週間

// 独自の Cache_Lite オプションを設定します
$tr->setCacheOption($name$value);
?>

Translation2_Decorator クラス概要 (Previous) (Next) Translation2_Decorator_CacheMemory クラス概要

Download Documentation Last updated: Sun, 20 Jul 2008
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.