8000 add cache:pool:delete command · symfony/symfony-docs@8136cbf · GitHub
[go: up one dir, main page]

Skip to content

Commit 8136cbf

Browse files
author
Henry Snoek
committed
add cache:pool:delete command
1 parent 001f5dd commit 8136cbf

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

components/cache/cache_pools.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,20 @@ when all items are successfully deleted)::
127127
.. tip::
128128

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

133+
To remove *one specific item* from the *given pool*:
134+
135+
.. code-block:: terminal
136+
137+
$ php bin/console cache:pool:delete <cache-pool-name> <cache-key-name>
138+
139+
# deletes the "cache_key" item from the "cache.app" pool
140+
$ php bin/console cache:pool:delete cache.app cache_key
141+
142+
You can also remove *all items* from the *given pool(s)*:
143+
133144
.. code-block:: terminal
134145
135146
$ php bin/console cache:pool:clear <cache-pool-name>
@@ -140,6 +151,9 @@ when all items are successfully deleted)::
140151
# clears the "cache.validation" and "cache.app" pool
141152
$ php bin/console cache:pool:clear cache.validation cache.app
142153
154+
.. versionadded:: 4.1
155+
The ``cache:pool:delete`` command was introduced in Symfony 4.1.
156+
143157
.. _component-cache-cache-pool-prune:
144158

145159
Pruning Cache Items

0 commit comments

Comments
 (0)
0