Skip to content

Added docs for the cache:pool:clear command #7206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions components/cache/cache_pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cache-pool-name>

# 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