Registry / utility / psr-cache

psr-cache

JSON →
library3.0.0phppackagistunverified

Common interface for caching libraries.

composer require psr/cache
INSTALL
IMPORT
SIG · PSR-CACHE
P
psr-cache
utilityphpv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CacheItemPoolInterface
use Psr\Cache\CacheItemPoolInterface;

Use a PSR-6 cache pool to store and retrieve cached data.

use Psr\Cache\CacheItemPoolInterface; function getCachedData(CacheItemPoolInterface $pool): string { $item = $pool->getItem('my_key'); if (!$item->isHit()) { $item->set('fresh data'); $pool->save($item); } return $item->get(); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
psr-cache — pip install psr-cache · libregistry