class SysVCacheItemPool implements CacheItemPoolInterface (View source)

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.

Constants

VAR_KEY

DEFAULT_PROJ

DEFAULT_MEMSIZE

DEFAULT_PERM

Methods

__construct(array $options = [])

Create a SystemV shared memory based CacheItemPool.

CacheItemInterface
getItem(mixed $key)

No description

iterable
getItems(array $keys = [])

No description

bool
hasItem($key)

{@inheritdoc}

bool
clear()

{@inheritdoc}

bool
deleteItem($key)

{@inheritdoc}

bool
deleteItems(array $keys)

{@inheritdoc}

bool
save(CacheItemInterface $item)

{@inheritdoc}

bool
saveDeferred(CacheItemInterface $item)

{@inheritdoc}

bool
commit()

{@inheritdoc}

Details

__construct(array $options = [])

Create a SystemV shared memory based CacheItemPool.

Parameters

array $options

{ [optional] Configuration options.

@type int    $variableKey The variable key for getting the data from the shared memory. **Defaults to** 1.
@type string $proj        The project identifier for ftok. This needs to be a one character string.
                          **Defaults to** 'A'.
@type int    $memsize     The memory size in bytes for shm_attach. **Defaults to** 10000.
@type int    $perm        The permission for shm_attach. **Defaults to** 0600.

}

CacheItemInterface getItem(mixed $key)

No description

Parameters

mixed $key

Return Value

CacheItemInterface

iterable getItems(array $keys = [])

No description

Parameters

array $keys

Return Value

iterable

bool hasItem($key)

{@inheritdoc}

Parameters

$key

Return Value

bool

bool clear()

{@inheritdoc}

Return Value

bool

bool deleteItem($key)

{@inheritdoc}

Parameters

$key

Return Value

bool

bool deleteItems(array $keys)

{@inheritdoc}

Parameters

array $keys

Return Value

bool

bool save(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

Return Value

bool

bool saveDeferred(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

Return Value

bool

bool commit()

{@inheritdoc}

Return Value

bool