Class Summary Translation2_Decorator (Previous) (Next) Class Summary Translation2_Decorator_CacheMemory

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

Class Summary Translation2_Decorator_CacheLiteFunction

Class Summary Translation2_Decorator_CacheLiteFunction  -- Decorator to cache fetched data using Cache_Lite_Function class

Cache_Lite_Function Decorator Example

This decorator provides a very efficient cache layer. It requires PEAR::Cache_Lite. It supports all the main options supported by Cache_Lite:

  • lifeTime [integer]

  • cacheDir [string]

  • fileLocking [boolean]

  • caching [boolean]

If you need to pass an option directly to the Cache_Lite object, you can use setCacheOption().

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

//change a custom Cache_Lite option
$tr->setCacheOption($name$value);
?>

Class Summary Translation2_Decorator (Previous) (Next) Class Summary Translation2_Decorator_CacheMemory

Download Documentation Last updated: Sun, 11 May 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.