Reference documentation and code samples for the Google Auth Library Client class MemoryCacheItemPool.
Simple in-memory cache implementation.
Namespace
Google \ Auth \ Cache
Methods
getItem
{@inheritdoc}
Parameter
Name
Description
key
mixed
Returns
Type
Description
Psr\Cache\CacheItemInterface
The corresponding Cache Item.
getItems
{@inheritdoc}
Parameter
Name
Description
keys
array
Returns
Type
Description
iterable<\psr\cache\cacheiteminterface>
A traversable collection of Cache Items keyed by the cache keys of
each item. A Cache item will be returned for each key, even if that
key is not found. However, if no keys are specified then an empty
traversable MUST be returned instead.
hasItem
{@inheritdoc}
Parameter
Name
Description
key
mixed
Returns
Type
Description
bool
True if item exists in the cache, false otherwise.
clear
{@inheritdoc}
Returns
Type
Description
bool
True if the pool was successfully cleared. False if there was an error.
deleteItem
{@inheritdoc}
Parameter
Name
Description
key
mixed
Returns
Type
Description
bool
True if the item was successfully removed. False if there was an error.
deleteItems
{@inheritdoc}
Parameter
Name
Description
keys
array
Returns
Type
Description
bool
True if the items were successfully removed. False if there was an error.
save
{@inheritdoc}
Parameter
Name
Description
item
Psr\Cache\CacheItemInterface
Returns
Type
Description
bool
True if the item was successfully persisted. False if there was an error.
saveDeferred
{@inheritdoc}
Parameter
Name
Description
item
Psr\Cache\CacheItemInterface
Returns
Type
Description
bool
False if the item could not be queued or if a commit was attempted and failed. True otherwise.
commit
{@inheritdoc}
Returns
Type
Description
bool
True if all not-yet-saved items were successfully saved or there were none. False otherwise.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Google Auth Library Client - Class MemoryCacheItemPool (1.47.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.47.1 (latest)](/php/docs/reference/auth/latest/Cache.MemoryCacheItemPool)\n- [1.47.0](/php/docs/reference/auth/1.47.0/Cache.MemoryCacheItemPool)\n- [1.46.0](/php/docs/reference/auth/1.46.0/Cache.MemoryCacheItemPool)\n- [1.45.2](/php/docs/reference/auth/1.45.2/Cache.MemoryCacheItemPool) \nReference documentation and code samples for the Google Auth Library Client class MemoryCacheItemPool.\n\nSimple in-memory cache implementation.\n\nNamespace\n---------\n\nGoogle \\\\ Auth \\\\ Cache\n\nMethods\n-------\n\n### getItem\n\n{@inheritdoc}\n\n### getItems\n\n{@inheritdoc}\n\n### hasItem\n\n{@inheritdoc}\n\n### clear\n\n{@inheritdoc}\n\n### deleteItem\n\n{@inheritdoc}\n\n### deleteItems\n\n{@inheritdoc}\n\n### save\n\n{@inheritdoc}\n\n### saveDeferred\n\n{@inheritdoc}\n\n### commit\n\n{@inheritdoc}"]]