Skip to content

Commit 398892e

Browse files
authored
Update cache_pools.rst
When retrieving an item from cache you have to use `getItem()` and not `get()` The `Psr\Cache\CacheItemPoolInterface` doesn't declare the `get` method
1 parent 42c7ea8 commit 398892e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/cache/cache_pools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ item in the cache immediately (it returns ``true`` if the item was saved or
282282
``false`` if some error occurred)::
283283

284284
// ...
285-
$userFriends = $cache->get('user_'.$userId.'_friends');
285+
$userFriends = $cache->getItem('user_'.$userId.'_friends');
286286
$userFriends->set($user->getFriends());
287287
$isSaved = $cache->save($userFriends);
288288

0 commit comments

Comments
 (0)