Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

querycache.ini [QueryCacheSettings]

The settings of [QueryCacheSettings] in querycache.ini: Mode, Storage, ApcuReserve, MaxAge, MaxRows, ExcludeTables

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/ini-settings/querycache/QueryCacheSettings.md

On this page

querycache.ini [QueryCacheSettings]

The block [QueryCacheSettings] of settings/querycache.ini, with 6 setting(s).

Never edit settings/querycache.ini itself: an update replaces it. Put the settings you change in an override, which wins over the shipped file:

  • settings/override/querycache.ini.append.php for every siteaccess,
  • settings/siteaccess/<siteaccess>/querycache.ini.append.php for one siteaccess,
  • extension/<extension>/settings/querycache.ini.append.php in an extension (read when the extension is active).

Mode

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/

Default: off.

<?php /* #?ini charset="utf-8"?
# settings/override/querycache.ini.append.php
[QueryCacheSettings]
Mode=off
*/ ?>

Storage

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.

Default: auto.

<?php /* #?ini charset="utf-8"?
# settings/override/querycache.ini.append.php
[QueryCacheSettings]
Storage=auto
*/ ?>

ApcuReserve

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.

Default: 25.

<?php /* #?ini charset="utf-8"?
# settings/override/querycache.ini.append.php
[QueryCacheSettings]
ApcuReserve=25
*/ ?>

MaxAge

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.

Default: 300.

<?php /* #?ini charset="utf-8"?
# settings/override/querycache.ini.append.php
[QueryCacheSettings]
MaxAge=300
*/ ?>

MaxRows

Results with more rows are not kept.

Default: 5000.

<?php /* #?ini charset="utf-8"?
# settings/override/querycache.ini.append.php
[QueryCacheSettings]
MaxRows=5000
*/ ?>

ExcludeTables

Tables whose SELECTs are never cached.

Default: a list of 3: ezsession, ezpending_actions, ezcollab_notification_rule.

<?php /* #?ini charset="utf-8"?
# settings/override/querycache.ini.append.php
[QueryCacheSettings]
# an empty "ExcludeTables[]" first replaces the shipped list; without it the items are added
ExcludeTables[]
ExcludeTables[]=ezsession
ExcludeTables[]=ezpending_actions
ExcludeTables[]=ezcollab_notification_rule
*/ ?>

Generated by ./console exp:help:examples from settings/querycache.ini. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x