{"id":50119488,"url":"https://github.com/in2code-de/in2shortcutcache","last_synced_at":"2026-05-23T18:04:23.842Z","repository":{"id":351029469,"uuid":"1209263705","full_name":"in2code-de/in2shortcutcache","owner":"in2code-de","description":"Fixes cache lifetime for pages with shortcut (Insert Records) content elements in TYPO3","archived":false,"fork":false,"pushed_at":"2026-04-13T09:12:07.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-23T04:28:54.880Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/in2code-de.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-13T08:52:03.000Z","updated_at":"2026-04-13T20:46:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/in2code-de/in2shortcutcache","commit_stats":null,"previous_names":["in2code-de/in2shortcutcache"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/in2code-de/in2shortcutcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in2code-de%2Fin2shortcutcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in2code-de%2Fin2shortcutcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in2code-de%2Fin2shortcutcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in2code-de%2Fin2shortcutcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/in2code-de","download_url":"https://codeload.github.com/in2code-de/in2shortcutcache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in2code-de%2Fin2shortcutcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33406480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-23T18:04:12.461Z","updated_at":"2026-05-23T18:04:23.831Z","avatar_url":"https://github.com/in2code-de.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# in2shortcutcache – Correct cache lifetime for shortcut content elements in TYPO3\n\n## Introduction\n\nThis TYPO3 extension fixes a known core issue (Forge [#91561](https://forge.typo3.org/issues/91561),\n[#93661](https://forge.typo3.org/issues/93661)) where the page cache lifetime is not correctly calculated\nwhen **\"Insert Records\"** (`CType = shortcut`) content elements reference time-controlled target elements.\n\n### The Problem\n\nWhen a shortcut element references a target element with a `starttime` or `endtime`, TYPO3 calculates the\ncache lifetime only based on the shortcut record itself. Since the shortcut has no time settings, the\ndefault lifetime of **86400 seconds (24 hours)** is used — instead of the remaining time until the next\nvisibility change of the referenced target element.\n\nThis affects TYPO3's page cache in general: pages are served from cache even after a scheduled visibility\nchange of a referenced element should have taken effect. Any caching layer built on top — such as\nstaticfilecache — inherits the same incorrect lifetime and compounds the problem further.\n\n### The Solution\n\nThe extension listens to TYPO3's `ModifyCacheLifetimeForPageEvent` PSR-14 event. For each page render,\nit:\n\n1. Queries all `CType = shortcut` content elements on the current page\n2. Parses their `records` field to find the referenced `tt_content` UIDs\n3. Reads the `starttime` and `endtime` of those referenced records\n4. Reduces the page cache lifetime to match the next scheduled visibility change\n\n## Installation\n\n```bash\ncomposer req in2code/in2shortcutcache\n```\n\nNo further configuration is required. The extension registers its event listener automatically via\n`Configuration/Services.yaml`.\n\n## Supported formats for the `records` field\n\nThe `tt_content.records` field (used by `CType = shortcut`) can contain UIDs in different formats.\nAll of the following are handled correctly:\n\n| Format                  | Example                         | Handling                                       |\n|-------------------------|---------------------------------|------------------------------------------------|\n| Plain integer UIDs      | `123,456`                       | Resolved as `tt_content` UIDs                  |\n| Table-prefixed UIDs     | `tt_content_123,tt_content_456` | Prefix stripped, resolved as `tt_content` UIDs |\n| Mixed with other tables | `pages_123,tt_content_234`      | Non-`tt_content` entries are ignored           |\n\n## Scope\n\nThe following fields of the referenced `tt_content` records are considered:\n\n| Source        | Fields                                                                      | Condition                                                                      |\n|---------------|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| TYPO3 core    | `starttime`, `endtime` (Unix timestamps)                                    | Always                                                                         |\n| in2frequently | `tx_in2frequently_starttime`, `tx_in2frequently_endtime` (cron expressions) | Only if `in2code/in2frequently` is installed and `tx_in2frequently_active = 1` |\n\nSupport for `in2frequently` is optional. If the package is not installed, the behaviour is identical\nto before. No configuration is required — the integration is activated automatically once\n`in2code/in2frequently` is present.\n\nThe fix applies to direct shortcut references. Nested shortcuts (a shortcut referencing another shortcut\nthat in turn references a time-controlled element) are currently not resolved transitively.\n\n## Configuration\n\nThe extension can be configured via the TYPO3 Extension Manager or `LocalConfiguration.php` under the\nkey `in2shortcutcache`.\n\n| Option                        | Type | Default | Description                                                                                                                                                                                                                                                                                   |\n|-------------------------------|------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n\n## Changelog\n\n| Version | Date       | State   | Description                                                                                 |\n|---------|------------|---------|---------------------------------------------------------------------------------------------|\n| 1.0.0   | 2026-04-13 | Task    | Initial release                                                                             |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin2code-de%2Fin2shortcutcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fin2code-de%2Fin2shortcutcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin2code-de%2Fin2shortcutcache/lists"}