Skip to content

Commit f59e8d8

Browse files
authored
(feat): Item key call for deletion
1 parent ea1c2e6 commit f59e8d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/cache/cache_invalidation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ you can invalidate the cached items by calling
4848
// if you know the cache key, you can also delete the item directly
4949
$cache->deleteItem('cache_key');
5050

51+
// If you don't remember the item key, you can use the getKey() method
52+
$cache->deleteItem($item->getKey());
53+
5154
Using tags invalidation is very useful when tracking cache keys becomes difficult.
5255

5356
Tag Aware Adapters

0 commit comments

Comments
 (0)