services:
    _defaults:
        public: true

    doctrine.cache.provider:
        class: Doctrine\Common\Cache\FilesystemCache
        arguments:
            - "%kernel.cache_dir%/doctrine"

    guzzle.cache:
        class: Csa\Bundle\GuzzleBundle\GuzzleHttp\Cache\DoctrineAdapter
        arguments:
            - "@doctrine.cache.provider"
            - "%prestashop.addons.api_client.ttl%"
        shared: false

    main.warmer.cache_warmer:
        class: PrestaShopBundle\Cache\CacheWarmer
        arguments:
            - "@filesystem"
        tags:
            - { name: kernel.cache_warmer }

    prestashop.cache.refresh:
        class: PrestaShopBundle\Service\Cache\Refresh
        arguments:
            - "@kernel"
        calls:
            - [addCacheClear, []]
