Issue Feature Closed

#29887Implementing lilio_cachetags functionality in Core

Mathias Bolt Lesniak 09/16/11, 10:48 updated 11/13/26, 17:34

Description

Hi!

I recently released the extension “Easy Cache Tags” (lilio_cachetags), as an easy way of connecting cache tags to cache instances (and clearing cache based on the same) using TypoScript. On the English mailing list, it has been suggested (by Kay Strobach) that I suggest that the extension’s functionality is considered taken into the Core. Not a bad idea, I think, as it solves a fairly widespread caching issue.

What do you think? The extension is still missing some features (like a solution for adding cache tags in the Backend), but it could maybe make it into 4.7…

Keep up the good work! :-D

http://typo3.org/extensions/repository/view/lilio_cachetags/current/

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 6

  1. Wouter Wolters commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2014-12-17T19:05:22+00:00" > 12/17/14, 19:05 </span>

    Hi,

    as this issue is very old. Is this feature missing in newer versions of TYPO3 CMS (6.2.9)?

  2. Mathias Bolt Lesniak commented <span data-processor="relativetime" data-value="2014-12-17T22:18:26+00:00" > 12/17/14, 22:18 </span>

    Wouter Wolters wrote:
    > as this issue is very old. Is this feature missing in newer versions of TYPO3 CMS (6.2.9)?

    As far as I am aware, the complete feature is still missing.

    TYPO3 4.7 introduced the parameters cache and addPageCacheTags into stdWrap. This feature covers parts of what lilio_cachetags does, but is far from complete:

    • stdWrap’s addPageCacheTags is a comma separated list, whilst lilio_cachetags uses an array to create cache tags. In case of multiple tags, an array is easier to modify and more protected from accidental overwrites.
    • lilio_cachetags enables you to clear the cache for specific cache tags through TypoScript.

    - Mathias

  3. Mathias Bolt Lesniak commented <span data-processor="relativetime" data-value="2019-11-07T08:32:18+00:00" > 11/07/19, 08:32 </span>

    Here’s an update of what’s still missing and what’s implemented in the core thus far.

    The entire functionality of the CACHETAGS cObject is now in the core.
    https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Functions/Cache.html

    The CLEARCACHETAGS cObject functionality (i.e. to be able to clear the cache for certain tags) is still missing.
    Some of the functionality can be implemented through TCEMAIN in the backend, but it is limited to hard-coded tags. I.e. you cannot clear blah_123 where 123 is the UID of the record changed.
    https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/TceMain.html#clearcachecmd

    The manual’s “Why is this needed” section gives a good example of why clearing the cache based on a dynamic cache tag could be useful. https://docs.typo3.org/typo3cms/extensions/lilio_cachetags/0.0.1/Manual/Index.html#why-is-it-needed

  4. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-13T17:34:42+00:00" > 11/13/26, 17:34 </span>

    Closing this issue as resolved. Everything requested here is available in core today, though in a different form than EXT:lilio_cachetags provided it:

    Adding cache tags

    - stdWrap.cache.tags and stdWrap.addPageCacheTags (since 4.7)
    - Automatic frontend cache tagging (#104990, v13.3, feature toggle frontend.cache.autoTagging): page cache entries are tagged with the records used to render them, with no configuration needed.

    Flushing caches by tag

    - On every record change, core flushes the cache tags and
    <uid>. Dynamic tags like tx_myext_item_123 therefore work out of the box: tag the output with addPageCacheTags, or let auto-tagging do it, and editing record 123 clears exactly those entries.<br>- Static tags: Page TSconfig TCEMAIN.clearCacheCmd = cacheTag:my_tag.<br>- Custom mappings, e.g. “when a news record changes, also flush myext_category</uid><uid>“: a listener for \TYPO3\CMS\Core\Cache\Event\BeforeRecordRelatedCachesAreFlushedEvent (#111263, v15) can add any tags.<br>- Outside the backend: the CacheFlusher service with CacheFlushDemand::forTags() / forRecord() (#111263, v15), and the cache:flushtags CLI command (#104054). <p>The one thing intentionally not provided is configuring flush rules in frontend TypoScript, as CLEARCACHETAGS did. Flushing happens when records are written, outside of frontend rendering, so Page TSconfig and the PSR-14 event are the right places for this. If a concrete case can’t be solved with the options above, please open a new issue describing it.</p></uid>