Skip to content

Commit

Permalink
Update docs/components/cache.rst
Browse files Browse the repository at this point in the history
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
  • Loading branch information
fakela and RCheesley committed Feb 16, 2024
1 parent 1ba62f3 commit d84905d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/components/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Removing cache items
Cache Pools include methods to delete a cache item, some of them, or all of them. The most common is ``Psr\\Cache\\CacheItemPoolInterface::deleteItem``, which deletes the cache item identified by the given key.

.. code-block:: php
$isDeleted = $cache->deleteItem('user_'.$userId);
Use the ``Psr\\Cache\\CacheItemPoolInterface::deleteItems`` method to delete several cache items simultaneously - it returns true only if all the items have been deleted, even when any or some of them don't exist.

Expand Down

0 comments on commit d84905d

Please sign in to comment.