Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e92a91

Browse files
authored
Update cache.rst
*Using Cache Tags* section has invalid example. Should use TagAwareCacheInterface.
1 parentfc9fe33 commit8e92a91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎cache.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,15 @@ to be able to invalidate the cache more efficient. One way to achieve that is to
486486
use cache tags. One or more tags could be added to the cache item. All items with
487487
the same key could be invalidate with one function call::
488488

489-
use Symfony\Contracts\Cache\ItemInterface;
489+
use Symfony\Contracts\Cache\TagAwareCacheInterface;
490490

491-
$value0 = $pool->get('item_0', function (ItemInterface $item) {
491+
$value0 = $pool->get('item_0', function (TagAwareCacheInterface $item) {
492492
$item->tag(['foo', 'bar'])
493493

494494
return 'debug';
495495
});
496496

497-
$value1 = $pool->get('item_1', function (ItemInterface $item) {
497+
$value1 = $pool->get('item_1', function (TagAwareCacheInterface $item) {
498498
$item->tag('foo')
499499

500500
return 'debug';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp