services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: false

  SFC\Staticfilecache\:
    resource: '../Classes/*'

  SFC\Staticfilecache\Service\GeneratorService:
    public: true

  SFC\Staticfilecache\Command\BoostQueueCommand:
    tags:
      - name: 'console.command'
        description: 'Run (work on) the cache boost queue. Call this task every 5 minutes.'
        command: 'staticfilecache:boostQueue'

  SFC\Staticfilecache\Command\FlushCacheCommand:
    tags:
      - name: 'console.command'
        description: 'Flush the cache. If the boost mode is active, all pages are added to the queue (you have to run the BoostQueueRun Command to recrawl the pages). If you use the force-boost-mode-flush argument, you directly drop the cache even the page is in Boostmode.'
        command: 'staticfilecache:flushCache'

  SFC\Staticfilecache\EventListener\AfterPackageDeactivationListener:
    tags:
      - name: event.listener
        identifier: 'AfterPackageDeactivationListener'
        event: TYPO3\CMS\Core\Package\Event\AfterPackageDeactivationEvent
        before: 'ForceStaticCacheListener'

  SFC\Staticfilecache\Cache\Listener\PageCacheableListener:
    tags:
      - name: event.listener
        identifier: 'PageCacheableListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'ForceStaticCacheListener'

  SFC\Staticfilecache\Cache\Listener\ValidUriListener:
    tags:
      - name: event.listener
        identifier: 'ValidUriListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'ForceStaticCacheListener'
      - name: event.listener
        identifier: 'ValidUriListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

  SFC\Staticfilecache\Cache\Listener\SolrIndexingProcessListener:
    tags:
      - name: event.listener
        identifier: 'SolrIndexingProcessListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

  SFC\Staticfilecache\Cache\Listener\T3CrawlerIndexingProcessListener:
    tags:
      - name: event.listener
        identifier: 'T3CrawlerIndexingProcessListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

  SFC\Staticfilecache\Cache\Listener\ValidRequestMethodListener:
    tags:
      - name: event.listener
        identifier: 'ValidRequestMethodListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'ForceStaticCacheListener'
      - name: event.listener
        identifier: 'ValidRequestMethodListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

  SFC\Staticfilecache\Cache\Listener\NoBackendUserCookieListener:
    tags:
      - name: event.listener
        identifier: 'NoBackendUserCookieListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

  SFC\Staticfilecache\Cache\Listener\NoAuthorizationListener:
    tags:
      - name: event.listener
        identifier: 'NoAuthorizationListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'ForceStaticCacheListener'
      - name: event.listener
        identifier: 'NoAuthorizationListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

  SFC\Staticfilecache\Cache\Listener\ForceStaticCacheListener:
    tags:
      - name: event.listener
        identifier: 'ForceStaticCacheListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\NoBackendUserListener:
    tags:
      - name: event.listener
        identifier: 'NoBackendUserListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\EnableListener:
    tags:
      - name: event.listener
        identifier: 'EnableListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\NoFakeFrontendListener:
    tags:
      - name: event.listener
        identifier: 'NoFakeFrontendListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\NoLongPathSegmentListener:
    tags:
      - name: event.listener
        identifier: 'NoLongPathSegmentListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\NoIntScriptsListener:
    tags:
      - name: event.listener
        identifier: 'NoIntScriptsListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\CachingAllowedListener:
    tags:
      - name: event.listener
        identifier: 'CachingAllowedListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\NoUserOrGroupSetListener:
    tags:
      - name: event.listener
        identifier: 'NoUserOrGroupSetListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\NoWorkspacePreviewListener:
    tags:
      - name: event.listener
        identifier: 'NoWorkspacePreviewListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\SiteCacheableListener:
    tags:
      - name: event.listener
        identifier: 'SiteCacheableListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\ValidDoktypeListener:
    tags:
      - name: event.listener
        identifier: 'ValidDoktypeListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Cache\Listener\ValidPageInformationListener:
    tags:
      - name: event.listener
        identifier: 'ValidPageInformationListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent

  SFC\Staticfilecache\Service\HttpPush\StyleHttpPush:
    tags:
      - name: event.listener
        identifier: 'StyleHttpPush'
        event: SFC\Staticfilecache\Event\HttpPushHeaderEvent

  SFC\Staticfilecache\Service\HttpPush\ScriptHttpPush:
    tags:
      - name: event.listener
        identifier: 'ScriptHttpPush'
        event: SFC\Staticfilecache\Event\HttpPushHeaderEvent

  SFC\Staticfilecache\Service\HttpPush\ImageHttpPush:
    tags:
      - name: event.listener
        identifier: 'ImageHttpPush'
        event: SFC\Staticfilecache\Event\HttpPushHeaderEvent

  SFC\Staticfilecache\Service\HttpPush\FontHttpPush:
    tags:
      - name: event.listener
        identifier: 'FontHttpPush'
        event: SFC\Staticfilecache\Event\HttpPushHeaderEvent

  SFC\Staticfilecache\Service\HttpPush\SvgHttpPush:
    tags:
      - name: event.listener
        identifier: 'SvgHttpPush'
        event: SFC\Staticfilecache\Event\HttpPushHeaderEvent

  SFC\Staticfilecache\Generator\ConfigGenerator:
    tags:
      - name: event.listener
        method: generate
        identifier: 'ConfigGeneratorCreate'
      - name: event.listener
        method: remove
        identifier: 'ConfigGeneratorRemove'

  SFC\Staticfilecache\Generator\HtaccessGenerator:
    tags:
      - name: event.listener
        method: generate
        identifier: 'HtaccessGeneratorCreate'
      - name: event.listener
        method: remove
        identifier: 'HtaccessGeneratorRemove'

  SFC\Staticfilecache\Generator\PhpGenerator:
    tags:
      - name: event.listener
        method: generate
        identifier: 'PhpGeneratorCreate'
      - name: event.listener
        method: remove
        identifier: 'PhpGeneratorRemove'

  SFC\Staticfilecache\Generator\PlainGenerator:
    tags:
      - name: event.listener
        method: generate
        identifier: 'PlainGeneratorCreate'
      - name: event.listener
        method: remove
        identifier: 'PlainGeneratorRemove'

  SFC\Staticfilecache\Generator\GzipGenerator:
    tags:
      - name: event.listener
        method: generate
        identifier: 'GzipGeneratorCreate'
      - name: event.listener
        method: remove
        identifier: 'GzipGeneratorRemove'

  SFC\Staticfilecache\Generator\BrotliGenerator:
    tags:
      - name: event.listener
        method: generate
        identifier: 'BrotliGeneratorCreate'
      - name: event.listener
        method: remove
        identifier: 'BrotliGeneratorRemove'
