interface CacheItemPoolManagerInterface implements CacheItemPoolInterface (View source)

Constants

PICK_FIRST

Select the first (enabled) provider in queue, do not traverse the queue.

PICK_LAST

Select the last (enabled) provider in queue, do not traverse the queue.

PICK_RANDOM

Select a random (enabled) provider in queue, do not traverse the queue.

PICK_BYWEIGHT

Select by weight, stop at first enabled provider.

PICK_ALL

Ask to all (enabled) providers and match responses.

PICK_TRAVERSE

Select the first (enabled) provider, in case of null response traverse the queue.

Methods

string
getNamespace()

Get current namespace

string|null
setNamespace(string $namespace)

Set current namespace

string|null
clearNamespace()

Chear the whole (current) namespace

int
addProvider(EnhancedCacheItemPoolInterface $provider, int $weight)

Add a new provider to the manager's stack

bool
removeProvider(int $id)

Remove provider from the manager's stack

getProvider(int $id)

Get a registered provider

array
getProviders(int $enabled)

Get registered providers

getSelectedProvider()

Get the last selected provider

CacheItemPoolManagerStats
getStats()

Get stats from all providers

Details

string getNamespace()

Get current namespace

Return Value

string

string|null setNamespace(string $namespace)

Set current namespace

Parameters

string $namespace Namespace where $key resides

Return Value

string|null

string|null clearNamespace()

Chear the whole (current) namespace

Return Value

string|null

int addProvider(EnhancedCacheItemPoolInterface $provider, int $weight)

Add a new provider to the manager's stack

Parameters

EnhancedCacheItemPoolInterface $provider
int $weight

Return Value

int

bool removeProvider(int $id)

Remove provider from the manager's stack

Parameters

int $id

Return Value

bool

EnhancedCacheItemPoolInterface getProvider(int $id)

Get a registered provider

Parameters

int $id

Return Value

EnhancedCacheItemPoolInterface

array getProviders(int $enabled)

Get registered providers

Parameters

int $enabled If true, only enabled providers will be returned

Return Value

array

EnhancedCacheItemPoolInterface getSelectedProvider()

Get the last selected provider

CacheItemPoolManagerStats getStats()

Get stats from all providers

Return Value

CacheItemPoolManagerStats