services:
  _defaults:
    public: true

  # Cache adapter
  prestashop.static_cache.adapter:
    class: Symfony\Component\Cache\Adapter\ArrayAdapter
    tags:
      - { name: monolog.logger, channel: cache }
      - { name: cache.pool, clearer: cache.default_clearer }
    calls:
      - [ 'setLogger', [ '@logger' ] ]

  prestashop.core.cache.clearer.cache_clearer_chain:
    class: 'PrestaShop\PrestaShop\Core\Cache\Clearer\CacheClearerChain'
    arguments:
      - '@prestashop.adapter.cache.clearer.symfony_cache_clearer'
      - '@prestashop.adapter.cache.clearer.smarty_cache_clearer'
      - '@prestashop.adapter.cache.clearer.xml_cache_clearer'
      - '@prestashop.adapter.cache.clearer.media_cache_clearer'
      - '@prestashop.adapter.cache.clearer.class_index_cache_clearer'
      - '@PrestaShop\PrestaShop\Adapter\Cache\Clearer\DoctrineCacheClearer'

  prestashop.core.cache.clearer.product_cache_clearer_chain:
    class: 'PrestaShop\PrestaShop\Core\Cache\Clearer\CacheClearerChain'
    arguments:
      - '@prestashop.adapter.cache.clearer.smarty_cache_clearer'
      - '@prestashop.adapter.cache.clearer.media_cache_clearer'
