ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:adodb_cache_dir

This is an old revision of the document!


$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.1453074270.txt.gz · Last modified: 2017/04/21 11:32 (external edit)