Skip to content
  • Benjamin Franzke's avatar
    [FEATURE] Add cache:warmup console command · 4e25a578
    Benjamin Franzke authored and Benni Mack's avatar Benni Mack committed
    A cache:warmup CLI command is added that is safe to be
    executed during deployment or development mode.
    
    It is made extra sure that the command will be executable,
    even if all caches are stale or even broken. That means this
    command is able to repair broken di, localconf and tca caches.
    Technically this became due to preparations for lowlevel
    cli commands in #86248.
    
    Caches that will be warmed up by TYPO3 core:
     + DI
     + ext_localconf
     + TCA
     + ext_tables
     + middleware stack
     + PackageManager
     + sites-configuration
     + expressionLanguageProviders
     + BackendRoutes
     + l10n (parses all xlf files, and creates cache for all languages)
     + assets: BackendIcons
     + dashboard: DashboardPresets
     + dashboard: WidgetGroups
    
    Out of scope or impossible to be warmed:
     * Frontend warmup:
       Can be providedby extensions that listen for the
       CacheWarmupEvent
     * RequireJS (assets cache): Often applies with context-conditions
       therefore not reliably warmable.
     * Extbase – better of for a separate patch
       intesting cache entries would be: RequestHandlers, ClassSchemata
       and PersistenceClasses(?)
     * Warmup of Fluid templates:
       It is impossible to auto-detect whether all files in
       Resources/{Templates,Layouts,Partials} are Fluid files.
       Could by added later on with an explicit registry that
       allows to define which templates are suitable for warmup.
    
    Releases: master
    Resolves: #93436
    Change-Id: I53dd8915a2e06b3d21d778af985c76132e0d4f67
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61645
    
    
    Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
    Tested-by: default avatarcore-ci <typo3@b13.com>
    Tested-by: default avatarBenni Mack <benni@typo3.org>
    Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
    Reviewed-by: default avatarBenni Mack <benni@typo3.org>
    4e25a578