Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] cache:pool:delete command #9628

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 1 commit into from
May 16, 2018
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
16 changes: 15 additions & 1 deletion components/cache/cache_pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,20 @@ when all items are successfully deleted)::
.. tip::

If the cache component is used inside a Symfony application, you can remove
*all items* from the *given pool(s)* using the following command (which resides within
items from cache pools using the following commands (which reside within
the :ref:`framework bundle <framework-bundle-configuration>`):

To remove *one specific item* from the *given pool*:

.. code-block:: terminal

$ php bin/console cache:pool:delete <cache-pool-name> <cache-key-name>
Copy link
Contributor

Choose a reason for hiding this comment

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

one thing that is not clear for me here is how you get the list of cache pool names :/

Copy link
Member

Choose a reason for hiding this comment

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

You configured them yourself in the framework.cache section. Do you think we need to clarify that?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think so. Isn't there app and system as well by default?


# deletes the "cache_key" item from the "cache.app" pool
$ php bin/console cache:pool:delete cache.app cache_key

You can also remove *all items* from the *given pool(s)*:

.. code-block:: terminal

$ php bin/console cache:pool:clear <cache-pool-name>
Expand All @@ -140,6 +151,9 @@ when all items are successfully deleted)::
# clears the "cache.validation" and "cache.app" pool
$ php bin/console cache:pool:clear cache.validation cache.app

.. versionadded:: 4.1
The ``cache:pool:delete`` command was introduced in Symfony 4.1.

.. _component-cache-cache-pool-prune:

Pruning Cache Items
Expand Down