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

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

  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: 'SfcAfterPackageDeactivationListener'
        event: TYPO3\CMS\Core\Package\Event\AfterPackageDeactivationEvent
        before: 'SfcCacheRuleForceStaticCacheListener'

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

  SFC\Staticfilecache\Cache\Listener\ValidUriListener:
    tags:
      - name: event.listener
        identifier: 'SfcCacheRuleValidUriListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'SfcCacheRuleForceStaticCacheListener'
      - name: event.listener
        identifier: 'SfcCacheRuleValidUriListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

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

  SFC\Staticfilecache\Cache\Listener\ValidRequestMethodListener:
    tags:
      - name: event.listener
        identifier: 'SfcCacheRuleValidRequestMethodListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'SfcCacheRuleForceStaticCacheListener'
      - name: event.listener
        identifier: 'SfcCacheRuleValidRequestMethodListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

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

  SFC\Staticfilecache\Cache\Listener\NoAuthorizationListener:
    tags:
      - name: event.listener
        identifier: 'SfcCacheRuleNoAuthorizationListener'
        event: SFC\Staticfilecache\Event\CacheRuleEvent
        before: 'SfcCacheRuleForceStaticCacheListener'
      - name: event.listener
        identifier: 'SfcCacheRuleNoAuthorizationListenerFallback'
        event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent

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

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

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