Skip to content

Instantly share code, notes, and snippets.

@leonlaser
Last active March 20, 2019 11:53
Show Gist options
  • Save leonlaser/e8939b57f638599a141d9bb4eb8f7c9f to your computer and use it in GitHub Desktop.
Save leonlaser/e8939b57f638599a141d9bb4eb8f7c9f to your computer and use it in GitHub Desktop.
[Cache handling in TYPO3 CMS via TSConfig/TypoScript/PHP] #cache #user #page #tags #tsconfig #typoscript #typo3
<?php
// PHP: Add cache tag to page
$GLOBALS['TSFE']->addCacheTags(['tagname', 'tagname2']);
# add a cache tags to page
page.stdWrap.addPageCacheTags = tagname,tagname2
# Page: Clear page cache for a tag via on save
TCEMAIN.clearCacheCmd = cacheTag:tagname,tagname2
# Page: Clear cache for page ids on save
TCEMAIN.clearCacheCmd = 1,2
# Page: Clear the whole page cache on save
TCEMAIN.clearCacheCmd = all
# User: Allow cache clearing for
# .. pages
options.clearCache.pages = 1
# .. the whole TYPO3 cache
options.clearCache.all = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment