PHPackages                             elementareteilchen/etcachetsobjects - 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. elementareteilchen/etcachetsobjects

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

elementareteilchen/etcachetsobjects
===================================

TypoScript API to allow caching of expensive TypoScript objects like menus

v9.0.0(4mo ago)11.4kGPL-2.0+PHPPHP ^8.2

Since Jul 20Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/ElementareTeilchen/etcachetsobjects)[ Packagist](https://packagist.org/packages/elementareteilchen/etcachetsobjects)[ RSS](/packages/elementareteilchen-etcachetsobjects/feed)WikiDiscussions main Synced yesterday

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

etcachetsobjects: Caching possibility for expensive TypoScript Objects like menus
=================================================================================

[](#etcachetsobjects-caching-possibility-for-expensive-typoscript-objects-like-menus)

Idea behind
-----------

[](#idea-behind)

On bigger pages you have quite often big menus with lots of pages and levels (like responsive menus or flyout menus) The rendering of these menus is quite heavy and is normally done on every rendered page. If you do not need to mark active or current pages or do this client side via JavaScript, then the menu might be identical on all / several pages. Perfect to be cached!

Currently, we use it only for menus, other TypoScript objects should work, but probably the cache invalidation needs refinement then.

HINT FOR DEBUGGING: we activate caching only if no FE user is logged in. Every BE user gets her own individual cache.

Usage example 1: cache (part of) menu, which is identical on different pages
----------------------------------------------------------------------------

[](#usage-example-1-cache-part-of-menu-which-is-identical-on-different-pages)

```
lib.menu.sector = HMENU
lib.menu.sector {
    [...]
}
// only use caching if no fe_user is logged in, else just stay with original TS
lib.menu.sector_cached < lib.menu.sector
[loginUser('*') == false]
    lib.menu.sector_cached >
    lib.menu.sector_cached = USER
    lib.menu.sector_cached {
        userFunc = ElementareTeilchen\Etcachetsobjects\UserFunc\Cache\DatabaseBackendCacheHandler->handle
        conf < lib.menu.sector
        cacheTime = 0 // "0" means unlimited liftime, cleared via backend saving hook on page changes
        //here we can set parameter needed for creating different cache entries
        additionalUniqueCacheParameters = COA
        additionalUniqueCacheParameters {
            10 = TEXT
            10.value = 0
            10.override.data = siteLanguage:languageId

            20 = TEXT
            20.value = {$theme.pages.sectorstart_id}
        }
    }
[global]

```

Usage example 2: cache (part of) menu, which is identical on different pages, BUT should be different again on deeper levels
----------------------------------------------------------------------------------------------------------------------------

[](#usage-example-2-cache-part-of-menu-which-is-identical-on-different-pages-but-should-be-different-again-on-deeper-levels)

That one is used when you have a very big and deep page tree. On a certain level you don't want to flyout anymore, but show subpages only for the current page

```
lib.menu.sector = HMENU
lib.menu.sector {
    [...]
}
[loginUser('*') == false]
    lib.menu.sector_cached >
    lib.menu.sector_cached = USER
    lib.menu.sector_cached {
        userFunc = ElementareTeilchen\Etcachetsobjects\UserFunc\Cache\DatabaseBackendCacheHandler->handle
        conf < lib.menu.sector
        cacheTime = 0 // "0" means unlimited liftime, cleared via backend saving hook on page changes
        //here we can set parameter needed for creating different cache entries
        additionalUniqueCacheParameters = COA
        additionalUniqueCacheParameters {
            10 = TEXT
            10.value = 0
            10.override.data = GP:L

            20 = TEXT
            20.value = {$theme.pages.sectorstart_id}

            // special handling because of level 5/6
            // if on level 4 and page has subpages or if on level 5 and deeper we have individual menus
            30 = USER
            30.userFunc = ElementareTeilchen\Etcachetsobjects\UserFunc\MenuVariantCheck->levelGroupIdentifier
            30.sectorstartId = {$theme.pages.sectorstart_id}
            30.individualMenusComingAtLevel = 4
        }

        // no ContentObject like COA, TEXT needed, we just want the configuration value
        additionalTags {
            10 = sector_{$theme.pages.sectorstart_id}
            #20 =
        }
    }
[global]

```

Usage example 3: cache expensive lib. object which is used several times on same page
-------------------------------------------------------------------------------------

[](#usage-example-3-cache-expensive-lib-object-which-is-used-several-times-on-same-page)

```
lib.pageRootlineCategoryId = CONTENT
lib.pageRootlineCategoryId {
    [...]
}

lib.pageRootlineCategoryId_cached = USER
lib.pageRootlineCategoryId_cached {
    userFunc = ElementareTeilchen\Etcachetsobjects\UserFunc\Cache\TransientBackendCacheHandler->handle
    conf < lib.pageRootlineCategoryId
}

// then just replace _lib.pageRootlineCategoryId_ with _lib.pageRootlineCategoryId_cached_ wherever you use it.

```

Cache Invalidation
------------------

[](#cache-invalidation)

In the Extension Manager you can define which variant of invalidation you need.

### PageTS Setting

[](#pagets-setting)

Only clear cache of configured cache tags.

Specify which cache tags should be flushed when editing pages. Configure using Page TSconfig. Use cache tags you set in your TypoScript when caching menus / libs.

#### Add additional cache tags in TypoScript (which can be cleared via backend saving hook)

[](#add-additional-cache-tags-in-typoscript-which-can-be-cleared-via-backend-saving-hook)

When configuring your cached menus / libs, you can add additional cache tags. Example:

```
lib.menu.sector_cached {
    userFunc = ElementareTeilchen\Etcachetsobjects\UserFunc\Cache\DatabaseBackendCacheHandler->handle
    conf < lib.menu.sector

    ...

    // no ContentObject like COA, TEXT needed, we just want the configuration value
    additionalTags {
        10 = sector_{$theme.pages.sectorstart_id}
        20 = cacheTag1
        30 = cacheTag2
    }
}

```

#### Configure cache tags to be cleared

[](#configure-cache-tags-to-be-cleared)

Example TSconfig setting:

```
tx_etcachetsobjects.clearByTags = cacheTag1, cacheTag2

```

### Site based

[](#site-based)

Clear cache of whole site in which the edited page record resides in.

### From all pages

[](#from-all-pages)

Clear all cache when a page record is edited.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance77

Regular maintenance activity

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 68.1% 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

Every ~209 days

Recently: every ~312 days

Total

16

Last Release

127d ago

Major Versions

5.0.3 → v6.0.02020-09-10

v6.0.5 → v7.0.02021-05-03

v7.0.3 → v8.0.02023-04-13

v8.1.1 → v9.0.02026-02-27

PHP version history (3 changes)5.0.1PHP &gt;=7.0.0

v8.1.0PHP ^8.1

v9.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![franzkugelmann](https://avatars.githubusercontent.com/u/11320147?v=4)](https://github.com/franzkugelmann "franzkugelmann (32 commits)")[![ri-klein](https://avatars.githubusercontent.com/u/144095794?v=4)](https://github.com/ri-klein "ri-klein (8 commits)")[![mueller-sebastian](https://avatars.githubusercontent.com/u/20316366?v=4)](https://github.com/mueller-sebastian "mueller-sebastian (7 commits)")

### Embed Badge

![Health badge](/badges/elementareteilchen-etcachetsobjects/health.svg)

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

###  Alternatives

[friendsoftypo3/content-blocks

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

103519.9k53](/packages/friendsoftypo3-content-blocks)[lochmueller/staticfilecache

Transparent static file cache solution using mod\_rewrite and mod\_expires. Increase performance for static pages by a factor of 230!!

1271.4M4](/packages/lochmueller-staticfilecache)[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)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[b13/assetcollector

Asset collector - Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10125.6k](/packages/b13-assetcollector)

PHPackages © 2026

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