diff --git a/components/cache/cache_pools.rst b/components/cache/cache_pools.rst index f7fddbff78f..0f52c279c61 100644 --- a/components/cache/cache_pools.rst +++ b/components/cache/cache_pools.rst @@ -278,4 +278,19 @@ when all items are successfully deleted):: // ... $cacheIsEmpty = $cache->clear(); +.. tip:: + + If the Cache component is used inside a Symfony application, you can remove + all the items of a given cache pool with the following command: + + .. code-block:: terminal + + $ php bin/console cache:pool:clear + + # clears the "cache.app" pool + $ php bin/console cache:pool:clear cache.app + + # clears the "cache.validation" and "cache.app" pool + $ php bin/console cache:pool:clear cache.validation cache.app + .. _`Doctrine Cache`: https://github.com/doctrine/cache