Cache
Installation
PSR-16 - Simple Cache
To add support for PSR-16 Simple Cache, require the PSR.
Usage
All Adapters implement Psr\Cache\CacheItemPoolInterface
PSR-16 Simple Cache Wrapper
SimpleCache
implements Psr\SimpleCache\CacheInterface
.
Setting up a multi layer cache
The ChainAdapter
will read from all pools and return the first result it finds. So in the above example, if the cache item is not found in ArrayAdapter
, it will look for it in the ApcuAdapter
pool.
The ChainAdapter
will also write to and delete from all pools.
Last updated