Advanced options
Cache lifetime cap, debug logging and the scheduler task.
Advanced settings
-
- type
-
integer
- Default
-
86400 - Path
-
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['nr_temporal_cache']['advanced']['default_max_lifetime']
Upper bound in seconds for the cache lifetime this extension calculates.
Two places read it:
Dynamicreturns this value when no transition is scheduled at all, and caps the calculated lifetime at it otherwise.Timing Strategy:: get Cache Lifetime () Temporalcaps the value it finally writes to the event, using the hierarchy below.Cache Lifetime
Configuration hierarchy
Temporaltakes the first value that applies:Cache Lifetime:: determine Max Lifetime () - TypoScript
config., when it is set and greater than 0cache_ period - This setting, when it is greater than 0
- 86400 seconds
A value of 0 or less is therefore not a way to lift the cap — it is skipped and 86400 is used.
Prefer TypoScript for a site-wide period
setup.typoscriptconfig.cache_period = 43200Copied!TypoScript wins over this setting and applies to all other TYPO3 cache handling as well. Configure the extension setting only when temporal cache should have a different maximum than the rest of the site.
Examples --------
# Default: 24 hours advanced.default_max_lifetime = 86400 # Shorter: 12 hours advanced.default_max_lifetime = 43200 # Longer: 48 hours advanced.default_max_lifetime = 172800Copied!With
advanced.enabled, the listener records which source it used in thedebug_ logging max_,from_ typoscript max_andfrom_ extension_ config max_keys of its log entry.lifetime
-
- type
-
boolean
- Default
-
false - Path
-
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['nr_temporal_cache']['advanced']['debug_logging']
Gates the extension's diagnostic log entries. Three call sites check it:
TemporalCache Lifetime - Debug entry per page cache generation in which a lifetime was set, with
the keys
lifetime,uncapped_,lifetime max_,lifetime max_,from_ typoscript max_,from_ extension_ config timing_andstrategy scoping_.strategy SchedulerTiming Strategy - Info entry per processed transition, with the flushed cache tags and the active scoping strategy.
TemporalCache Scheduler Task - Debug entries when the task starts and when it finds no transitions in the range it examined.
Errors are logged regardless of this setting, and so is the completion entry of the scheduler task, so a failing transition is visible without switching it on.
Log location
Log entries go to TYPO3's configured log writers; the default file writer writes to
var/.log/ typo3_*. log grep TemporalCache var/log/typo3_*.logCopied!Warning
Enable only for debugging. The listener writes one entry per page cache generation.
Example -------
advanced.debug_logging = 1Copied!
Scheduler task
The scheduler and hybrid timing strategies do not flush caches
themselves.
They rely on Netresearch,
which finds the transitions that occurred since its last run and hands each one
to the active timing strategy.
ext_localconf.php registers the task type in
$GLOBALS, the list
the Scheduler module builds its task selection from, so
Scheduler → Create new task offers Temporal Cache: Process
transitions.
Note
Registering the task type is not the same as scheduling it.
Until a task is created and runs,
timing. leaves the page cache lifetime untouched and
has nothing that flushes it; hybrid still calculates a lifetime for
whichever content type is routed to dynamic, but the transitions routed
to the scheduler wait for the task; and the targeted cache tags of
per- and per- scoping stay unused, because only the task
triggers them.
timing. needs no task at all.
Creating the task is not enough on its own either — the Scheduler needs a cron entry that runs it:
* * * * * /usr/bin/php /var/www/html/vendor/bin/typo3 scheduler:run
scheduler: executes every task that is due.
Verifying the setup
vendor/ runs four checks:
- An index whose leading column is
starttime, and one whose leading column isendtime, on bothpagesandtt_content scoping.is one ofstrategy global,per-,page per-andcontent timing.is one ofstrategy dynamic,scheduler,hybrid- The time slot configuration, when harmonization is enabled
- The columns the queries rely on:
starttime,endtime,hidden,deleted,sys_on both tables, pluslanguage_ uid pidontt_content
It exits with 0 when every check passes and 1 otherwise.
Add -- for the per-field table of the schema check.
Next steps
- Optimization strategies - Scoping, timing and harmonization settings
- Examples & presets - Complete configuration examples
- Troubleshooting - Diagnose configuration issues