Download the PHP package elementareteilchen/etcachetsobjects without Composer

On this page you can find all versions of the php package elementareteilchen/etcachetsobjects. 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 etcachetsobjects

etcachetsobjects: Caching possibility for expensive TypoScript Objects like menus

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 on browser side via Javascript, then the menu might be idential 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

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\TypoScriptCache->databaseBackend
        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

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\TypoScriptCache->databaseBackend
        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\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

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

lib.pageRootlineCategoryId_cached = USER
lib.pageRootlineCategoryId_cached {
    userFunc = ElementareTeilchen\Etcachetsobjects\TypoScriptCache->transientBackend
    conf < lib.pageRootlineCategoryId
}

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

Cache Invalidation

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

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)

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

Configure cache tags to be cleared

Example TSconfig setting:

Site based

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

From all pages

Clear all cache when a page record is edited.


All versions of etcachetsobjects with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
typo3/cms-core Version ^11.5 || ^12.4
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 elementareteilchen/etcachetsobjects contains the following files

Loading the files please wait ....