[QueryCacheSettings]
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
The group [QueryCacheSettings] of settings/querycache.ini.
File
settings/querycache.ini; override it in settings/override/querycache.ini.append.php, in a siteaccess or in an extension.
Settings
| Setting | Default | Description |
|---|---|---|
| Mode | off | off nothing is kept (the default) request a memo for the length of one request: an identical SELECT is not run twice in the same request shared the memo, and results kept across requests (see Storage); any other process (scripts, the admin host, Velocity) invalidates through the shared state file in var/<site>/cache/querycache/ |
| Storage | auto | Where shared mode keeps results across requests: auto APCu where this PHP process has it, else files (the default); on the command line (cronjobs, scripts) without APCu only the request's memo apcu APCu only; without APCu shared works as request file files in var/<site>/cache/querycache/entries/, one per result, even with APCu: every web server that mounts var/ (a cluster on NFS or a SAN) shares them. The cronjob part cache_cleanup (cronjobs/querycache_cleanup.php) removes the files older than MaxAge; clearing the cache removes them too. |
| ApcuReserve | 25 | APCu is one memory for every site of the PHP-FPM pool. Full with valid entries, it empties itself completely: every other cache and counter in it is lost. With less than this share of APCu free (percent), shared mode stops adding results to APCu and keeps them for the request only, until entries expire (below the reserve the cache deletes its expired entries from APCu, once a minute for the pool). 0 never stops. Only with the APCu storage. |
| MaxAge | 300 | Longest life of a result even when no write touched its tables, in seconds: the bound for a write made outside Exponential (another program, a hand-run statement), which the cache cannot see. |
| MaxRows | 5000 | Results with more rows are not kept. |
| ExcludeTables[] | ezsession; ezpending_actions; ezcollab_notification_rule | Tables whose SELECTs are never cached. |
See also
Generated example: querycache.ini [QueryCacheSettings]
Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this group. The descriptions are the comment lines of settings/querycache.ini.
Contributors
- Graham Brookins Updated
Comments
Add a comment