[FEATURE] Provide core cache frontends via dependency injection
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / Services.yaml
index 3ab5532..415f203 100644 (file)
@@ -14,13 +14,6 @@ services:
     arguments:
       $configPath: "%env(TYPO3:configPath)%/sites"
 
-  TYPO3\CMS\Core\EventDispatcher\EventDispatcher:
-    arguments:
-      $listenerProvider: '@TYPO3\CMS\Core\EventDispatcher\ListenerProvider'
-
-  TYPO3\CMS\Core\EventDispatcher\ListenerProvider:
-    public: true
-
   TYPO3\CMS\Core\Package\PackageManager:
     autoconfigure: false
 
@@ -42,3 +35,40 @@ services:
       - { name: event.listener,
           identifier: 'legacy-slot',
           event: TYPO3\CMS\Core\Mail\Event\AfterMailerInitializationEvent }
+
+  # Core caches, cache.core and cache.assets are injected as early
+  # entries in TYPO3\CMS\Core\Core\Bootstrap and therefore omitted here
+  cache.hash:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['hash']
+
+  cache.pages:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['pages']
+
+  cache.pagesection:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['pagesection']
+
+  cache.runtime:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['runtime']
+
+  cache.rootline:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['rootline']
+
+  cache.imagesizes:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['imagesizes']
+
+  cache.l10n:
+    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
+    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
+    arguments: ['l10n']