Download the PHP package netresearch/nr-temporal-cache without Composer

On this page you can find all versions of the php package netresearch/nr-temporal-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nr-temporal-cache

Temporal Cache Management for TYPO3

CI codecov TYPO3 12 TYPO3 13 TYPO3 14 Version

Automatic cache invalidation for time-based content, developed by Netresearch DTT GmbH.

Addresses TYPO3 Forge Issue #14277: "Start/Stop time for pages is ignored in standard menu objects", reported in 2004 and still open.

Status: ext_emconf.php declares version 1.0.2, state stable. The API listed in Semantic Versioning from 1.0.0 onwards.

The Problem (20+ Years Old)

TYPO3's cache system is event-driven (invalidates when data changes) but doesn't handle temporal dependencies (when time passes):

The Solution

This extension provides automatic temporal cache management with configurable scoping and timing strategies.

How It Works

What Gets Fixed

Dynamic timing caps the page cache lifetime at the next transition; scheduler and hybrid timing flush cache tags once a transition has passed. Either way the cached output is regenerated:

Features

Three Scoping Strategies

Choose how cache invalidation is scoped:

  1. Global Scoping (default)

    • Under dynamic timing, every rendered page expires at the next transition anywhere on the site
    • Zero configuration, works everywhere
    • Best for: sites with minimal temporal content
  2. Per-Page Scoping (Targeted invalidation)

    • Flushes pageId_<uid> for the page a transition belongs to
    • Under dynamic timing, a rendered page's lifetime considers page transitions site-wide (menus) plus content transitions on that page
    • Best for: most sites
  3. Per-Content Scoping (Reference-aware)
    • Resolves every page a content element appears on via sys_refindex and flushes those page caches
    • Falls back to the element's parent page when scoping.use_refindex is off or the reference index yields nothing
    • Best for: sites with extensive temporal content shared across pages

Three Timing Strategies

Choose when to check for temporal transitions:

  1. Dynamic Timing (Event-based)

    • Caps the cache lifetime on every page cache generation, via ModifyCacheLifetimeForPageEvent
    • Immediate response to transitions
    • Best for: real-time requirements
  2. Scheduler Timing (Background processing)

    • Sets no cache lifetime at all, so page rendering runs no temporal queries
    • Transitions are processed by the scheduler task, which flushes the cache tags the scoping strategy selects
    • Best for: high-traffic sites
  3. Hybrid Timing (Both)
    • Separate timing per content type (timing.hybrid.pages, timing.hybrid.content)
    • Example: dynamic for pages, scheduler for content
    • Best for: complex requirements

Time Harmonization

Reduce cache churn by rounding transition times to fixed slots:

Backend Module

Visual management interface at Admin Tools → Temporal Cache:

Installation

Composer

No stability flag is needed: v1.0.0 carries no pre-release suffix, and ext_emconf.php declares state stable.

TER (TYPO3 Extension Repository)

The extension key nr_temporal_cache is registered in TER; version 1.0.0 is published there.

Manual

  1. Download from GitHub
  2. Extract to typo3conf/ext/nr_temporal_cache/
  3. Activate in Extension Manager

Requirements

From composer.json and ext_emconf.php:

Post-Installation

  1. Apply the database schema. The extension ships its indexes in ext_tables.sql — idx_temporalcache_starttime and idx_temporalcache_endtime on pages and tt_content — so they are created by the schema migrator, not by hand:

    Admin Tools → Maintenance → Analyze Database Structure does the same. vendor/bin/typo3 temporalcache:verify reports whether the indexes are in place.

  2. Configure the extension (optional - defaults work for most sites):
    • Admin Tools → Settings → Extension Configuration → nr_temporal_cache

Quick Start

CLI Commands Quick Reference

For administrators and DevOps:

See the command-line interface chapter for all four commands and their options.

Reports Module

Monitor system health via the TYPO3 backend:

  1. Navigate to System → Reports → Status Report
  2. Scroll to the Temporal Cache entries
  3. Review health indicators and recommendations

See the Reports module chapter for details.

Default Configuration (Zero Config)

Extension works out of the box with the defaults from ext_conf_template.txt:

This provides automatic temporal cache management with no configuration.

Recommended Configuration: "Balanced" Preset

Trade-off: content-driven cache churn is limited to the page a content element lives on, while page transitions still expire every page so menus stay correct.

Recommended Configuration: "Aggressive" Preset

Trade-off: page rendering runs no temporal queries at all, and invalidation is limited to the pages a transitioned element actually appears on — at the cost of depending on a background task and an up-to-date reference index.

Scheduler Task (For Scheduler and Hybrid Timing)

Netresearch\TemporalCache\Task\TemporalCacheSchedulerTask collects every transition that passed since its last run and hands each one to the timing strategy, which flushes the cache tags the scoping strategy selects. It records its last run in the TYPO3 registry (tx_temporalcache/scheduler_last_run), so the interval between runs determines how quickly a transition takes effect. Dynamic timing does not need the task.

Configuration Options

The twelve settings from ext_conf_template.txt, with their defaults:

Scoping Strategy (scoping.strategy, default global)

Use Refindex (scoping.use_refindex, default 1)

Timing Strategy (timing.strategy, default dynamic)

Hybrid Strategy - Pages (timing.hybrid.pages, default dynamic)

Hybrid Strategy - Content (timing.hybrid.content, default scheduler)

Enable Harmonization (harmonization.enabled, default 0)

Time Slots (harmonization.slots, default 00:00,06:00,12:00,18:00)

Tolerance (harmonization.tolerance, default 3600)

Auto-Round Reporting Flag (harmonization.auto_round, default 0)

Default Max Lifetime (advanced.default_max_lifetime, default 86400)

Debug Logging (advanced.debug_logging, default 0)

See the configuration reference for detailed explanations and examples.

Performance Summary

Behaviour by Configuration

Scoping Strategy Flushed by the scheduler task on a transition (scheduler and hybrid timing) Timing Strategy Per-page render cost
Global the whole page cache Dynamic 2 MIN() queries per monitored table - 4 with the default pages + tt_content - held in a request-level cache
Per-Page pageId_<uid> of the affected page Dynamic 4 queries by default: page transitions site-wide plus content transitions on the rendered page
Per-Content pageId_<uid> for every page the element appears on Dynamic Same as global - the lifetime lookup is the site-wide one
Any scoping Same as above Scheduler No queries - the listener sets no lifetime
Any scoping Same as above Hybrid Per content type, according to timing.hybrid.*

How scoping and timing interact:

  • Dynamic timing caps each rendered page's cache lifetime to its next relevant transition, as determined by the scoping strategy:
    • global — the next transition anywhere (every page expires together).
    • per-page — the next page transition site-wide (menus) plus content transitions on that page only. This is where per-page scoping reduces content-driven cache churn.
    • per-content — conservatively uses the site-wide transition for the lifetime (content can be embedded into arbitrary pages via references, so a per-page lifetime could serve stale embedded content). Its precise, per-content cache invalidation is applied to the flush tags under scheduler/hybrid timing.
  • Scheduler/Hybrid timing actively flush the cache tags chosen by the scoping strategy when a transition passes, giving per-content its full precision.

Rule of thumb: per-page + dynamic is great for content-heavy pages; large sites with cross-page embedded content should use per-content + scheduler.

Decision Guide

✅ Safe for:

⚠️ Evaluate Carefully:

See Performance Considerations for detailed analysis and mitigation strategies.

Rollout

The extension works immediately after installation with the default configuration.

  1. Install it (see Installation)
  2. Apply the database schema update
  3. Run vendor/bin/typo3 temporalcache:verify
  4. Adjust the strategies in Extension Configuration (optional)
  5. Test in a staging environment
  6. Deploy to production

See the configuration reference for details.

Documentation

The manual is published at docs.typo3.org. Its source lives in Documentation/ and builds locally with composer docs:render:

Compatibility

Declared support comes from composer.json and ext_emconf.php; the tested column is the matrix in .github/workflows/ci.yml.

TYPO3 constraint Declared PHP PHP versions tested in CI
^12.4 ^8.1 8.1, 8.2, 8.3, 8.4
^13.4 ^8.1 8.2, 8.3, 8.4, 8.5
^14.3 ^8.1 8.3, 8.4, 8.5

What a core solution would need

Phase 1: Extension with Strategies (Current)

Phase 2: Absolute Expiration API (Proposed for TYPO3 Core)

Phase 3: Automatic Temporal Detection (Proposed for TYPO3 Core)

None of this describes committed work in TYPO3 core: there is no accepted RFC, no target version and no timeline. The intent is to deprecate this extension if core ever covers it. See Phases.

Testing

Test Suites

Contributing

Contributions welcome. The conventions this repository enforces are in AGENTS.md.

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/my-feature
  3. Commit with a Conventional Commit subject, signed and signed off: git commit -S --signoff -m 'feat: add my feature'
  4. Push to branch: git push origin feature/my-feature
  5. Submit pull request

CI runs code style, PHPStan and Rector, plus the unit and functional suites across the version matrix above.

Governance and policies

This extension follows the organisation-wide Netresearch policies:

Checks that run on every pull request in this repository:

Support & Issues

Security

What the extension protects and what it does not, its trust boundaries and the checks behind them: SECURITY.md, not in public issues.

License

GPL-2.0-or-later - See LICENSE file

Credits

Developed by: Netresearch DTT GmbH

Addresses: TYPO3 Forge Issue #14277, reported 2004-08-20 and still open

Related Issues (both closed):


Made with ❤️ for the TYPO3 Community


All versions of nr-temporal-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
typo3/cms-core Version ^12.4 || ^13.4 || ^14.3
typo3/cms-scheduler Version ^12.4 || ^13.4 || ^14.3
typo3/cms-reports Version ^12.4 || ^13.4 || ^14.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package netresearch/nr-temporal-cache contains the following files

Loading the files please wait ...