PHPackages                             in2code/in2shortcutcache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. in2code/in2shortcutcache

ActiveTypo3-cms-extension[Caching](/categories/caching)

in2code/in2shortcutcache
========================

Fixes cache lifetime for pages with shortcut (Insert Records) content elements in TYPO3

1.0.0(3mo ago)113GPL-2.0-or-laterPHPPHP ^8.2

Since Apr 13Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/in2code-de/in2shortcutcache)[ Packagist](https://packagist.org/packages/in2code/in2shortcutcache)[ Docs](https://www.in2code.de)[ RSS](/packages/in2code-in2shortcutcache/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (19)Versions (2)Used By (0)

in2shortcutcache – Correct cache lifetime for shortcut content elements in TYPO3
================================================================================

[](#in2shortcutcache--correct-cache-lifetime-for-shortcut-content-elements-in-typo3)

Introduction
------------

[](#introduction)

This TYPO3 extension fixes a known core issue (Forge [\#91561](https://forge.typo3.org/issues/91561), [\#93661](https://forge.typo3.org/issues/93661)) where the page cache lifetime is not correctly calculated when **"Insert Records"** (`CType = shortcut`) content elements reference time-controlled target elements.

### The Problem

[](#the-problem)

When a shortcut element references a target element with a `starttime` or `endtime`, TYPO3 calculates the cache lifetime only based on the shortcut record itself. Since the shortcut has no time settings, the default lifetime of **86400 seconds (24 hours)** is used — instead of the remaining time until the next visibility change of the referenced target element.

This affects TYPO3's page cache in general: pages are served from cache even after a scheduled visibility change of a referenced element should have taken effect. Any caching layer built on top — such as staticfilecache — inherits the same incorrect lifetime and compounds the problem further.

### The Solution

[](#the-solution)

The extension listens to TYPO3's `ModifyCacheLifetimeForPageEvent` PSR-14 event. For each page render, it:

1. Queries all `CType = shortcut` content elements on the current page
2. Parses their `records` field to find the referenced `tt_content` UIDs
3. Reads the `starttime` and `endtime` of those referenced records
4. Reduces the page cache lifetime to match the next scheduled visibility change

Installation
------------

[](#installation)

```
composer req in2code/in2shortcutcache
```

No further configuration is required. The extension registers its event listener automatically via `Configuration/Services.yaml`.

Supported formats for the `records` field
-----------------------------------------

[](#supported-formats-for-the-records-field)

The `tt_content.records` field (used by `CType = shortcut`) can contain UIDs in different formats. All of the following are handled correctly:

FormatExampleHandlingPlain integer UIDs`123,456`Resolved as `tt_content` UIDsTable-prefixed UIDs`tt_content_123,tt_content_456`Prefix stripped, resolved as `tt_content` UIDsMixed with other tables`pages_123,tt_content_234`Non-`tt_content` entries are ignoredScope
-----

[](#scope)

The following fields of the referenced `tt_content` records are considered:

SourceFieldsConditionTYPO3 core`starttime`, `endtime` (Unix timestamps)Alwaysin2frequently`tx_in2frequently_starttime`, `tx_in2frequently_endtime` (cron expressions)Only if `in2code/in2frequently` is installed and `tx_in2frequently_active = 1`Support for `in2frequently` is optional. If the package is not installed, the behaviour is identical to before. No configuration is required — the integration is activated automatically once `in2code/in2frequently` is present.

The fix applies to direct shortcut references. Nested shortcuts (a shortcut referencing another shortcut that in turn references a time-controlled element) are currently not resolved transitively.

Configuration
-------------

[](#configuration)

The extension can be configured via the TYPO3 Extension Manager or `LocalConfiguration.php` under the key `in2shortcutcache`.

OptionTypeDefaultDescription`enableDataHandlerCacheFlush`bool`true`When enabled, the page cache for all pages containing shortcut elements that reference a just-saved or deleted `tt_content` record is flushed immediately via the DataHandler hook. Disable this on large installations if the flush causes unwanted performance impact during backend saves.Changelog
---------

[](#changelog)

VersionDateStateDescription1.0.02026-04-13TaskInitial release

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance81

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7b0e95a86a09cd1d3f7a0089ae701ccbe840ae9d794def4ef1829ceae48d061?d=identicon)[in2code](/maintainers/in2code)

---

Top Contributors

[![einpraegsam](https://avatars.githubusercontent.com/u/89055?v=4)](https://github.com/einpraegsam "einpraegsam (2 commits)")

### Embed Badge

![Health badge](/badges/in2code-in2shortcutcache/health.svg)

```
[![Health](https://phpackages.com/badges/in2code-in2shortcutcache/health.svg)](https://phpackages.com/packages/in2code-in2shortcutcache)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k57](/packages/friendsoftypo3-content-blocks)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[eliashaeussler/typo3-warming

Warming - Warms up Frontend caches based on an XML sitemap. Cache warmup can be triggered via TYPO3 backend or using a console command. Supports multiple languages and custom crawler implementations.

22260.2k](/packages/eliashaeussler-typo3-warming)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)[typo3/cms-fluid-styled-content

TYPO3 CMS Fluid Styled Content - Fluid templates for TYPO3 content elements.

229.4M401](/packages/typo3-cms-fluid-styled-content)[typo3/cms-seo

TYPO3 CMS SEO - SEO features including specific fields for SEO purposes, rendering of HTML meta tags and sitemaps.

168.9M158](/packages/typo3-cms-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
