views:

543

answers:

1

How to use Query cache with ADOdb in PHP? Is it default in ADOdb or Is there any configuration needed ?

+2  A: 

Set the cache directory, e.g.

$GLOBALS['ADODB_CACHE_DIR']=$_SERVER['DOCUMENT_ROOT'].'/../cache/adodb';

Now you can use the Cache* methods like CacheGetOne to get a cached result

$data = $rs->CacheGetOne($seconds_to_cache, $sql);
Paul Dixon