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 1 commit
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
9 changes: 9 additions & 0 deletions components/cache/cache_pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,13 @@ 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

$ ./bin/console cache:pool:clear <cache-pool-name>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be php bin/console cache:pool:clear <cache-pool-name> (this is the only Windows and Unix compatible command)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use comments to document other usages (IIRC, we do it in other places as well):

# 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