ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:adodb_cache_dir

$ADODB_CACHE_DIR

TypeString
Defaultempty

Description

If you are using recordset caching, this is the directory to save your recordsets in. There is no default definition . Define this before you call any caching functions such as cacheExecute.

If using this feature with PHP versions less than 5.4 we recommend setting

register_globals=off

in php.ini for security reasons.

Performance considerations

The speed of the query retrieval is dependent on the systems ability to read text files from a file system. Consider placing the cached queries on an SSD if available, or an in-memory filesystem

Syntax

$ADODB_CACHE_DIR='/home/adodb/caching';
$SQL = "SELECT * FROM large_table";
$db->cacheExecute($SQL);
register_globals=off

Unix Configuration

You might need to set your cache directory permissions to something similar to the following:

chown -R apache /path/to/adodb/cache
chgrp -R apache /path/to/adodb/cache

Windows Configuration

The directory that is used to save the cache files must be readable and writable by the IIS owner process.

v5/reference/adodb_cache_dir.txt · Last modified: 2016/03/20 02:43 by mnewnham