SystemV shared memory based CacheItemPool implementation.
This CacheItemPool implementation can be used among multiple processes, but it doesn't provide any locking mechanism. If multiple processes write to this ItemPool, you have to avoid race condition manually in your code.
CloneableInstantiable
- Implements
Psr\Cache\CacheItemPoolInterface
| Constants |
| public Google |
| public Google |
| public Google |
| public Google |
| public Google |
| Methods |
| public __construct( $options = []) Create a SystemV shared memory based CacheItemPool.
|
| public clear() : bool |
| public commit() : bool |
| public deleteItem( $key) : bool |
| public deleteItems(array $keys) : bool |
public getItem( $key) : Psr\Cache\CacheItemInterface
|
public getItems(array $keys = []) : iterable
|
| public hasItem( $key) : bool |
| public save(Psr\Cache\CacheItemInterface $item) : bool |
| public saveDeferred(Psr\Cache\CacheItemInterface $item) : bool |
| Properties |
private $deferredItems = NULL
|
private $hasLoadedItems = false
|
private $items = NULL
|
| private ?int $lockOwnerPid = NULL Maintain the process which is currently holding the semaphore to prevent deadlock.
|
private $options = NULL
|
private SysvSemaphore|false $semId = false
|
private $sysvKey = NULL
|
| Methods |
| private acquireLock() : bool |
| private attachShm() : SysvSharedMemory|false |
| private loadItems() Load the items from the shared memory.
|
| private releaseLock() : bool |
| private resetShm() : void |
| private saveCurrentItems() Save the current items.
|