previousTranslation2_Decorator クラス概要 (Previous) (Next) Translation2_Decorator_CacheMemory クラス概要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_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);
?>

previousTranslation2_Decorator クラス概要 (Previous) (Next) Translation2_Decorator_CacheMemory クラス概要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.