class SimpleCacheAdapter extends AbstractAdapter implements PruneableInterface, ResettableInterface

Traits

LoggerAwareTrait

Methods

hasItem($key)

{@inheritdoc}

clear()

{@inheritdoc}

deleteItem($key)

{@inheritdoc}

deleteItems(array $keys)

{@inheritdoc}

bool
enableVersioning(bool $enable = true)

Enables/disables versioning of items.

reset()

{@inheritdoc}

static 
handleUnserializeCallback($class)

No description

createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null)

No description

static 
createConnection($dsn, array $options = array())

No description

getItem($key)

{@inheritdoc}

getItems(array $keys = array())

{@inheritdoc}

save(CacheItemInterface $item)

{@inheritdoc}

saveDeferred(CacheItemInterface $item)

{@inheritdoc}

commit()

{@inheritdoc}

__destruct()

No description

prune()

{@inheritdoc}

__construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime)

No description

Details

in AbstractTrait at line line 85
hasItem($key)

{@inheritdoc}

Parameters

$key

in AbstractTrait at line line 105
clear()

{@inheritdoc}

in AbstractTrait at line line 129
deleteItem($key)

{@inheritdoc}

Parameters

$key

in AbstractTrait at line line 137
deleteItems(array $keys)

{@inheritdoc}

Parameters

array $keys

in AbstractTrait at line line 183
bool enableVersioning(bool $enable = true)

Enables/disables versioning of items.

When versioning is enabled, clearing the cache is atomic and doesn't require listing existing keys to proceed, but old keys may need garbage collection and extra round-trips to the back-end are required.

Calling this method also clears the memoized namespace version and thus forces a resynchonization of it.

Parameters

bool $enable

Return Value

bool the previous state of versioning

in AbstractTrait at line line 195
reset()

{@inheritdoc}

in AbstractTrait at line line 254
static handleUnserializeCallback($class)

Parameters

$class

in AbstractAdapter at line line 88
static AdapterInterface createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null)

Parameters

string $namespace
int $defaultLifetime
string $version
string $directory
LoggerInterface $logger

Return Value

AdapterInterface

in AbstractAdapter at line line 125
static createConnection($dsn, array $options = array())

Parameters

$dsn
array $options

in AbstractAdapter at line line 143
CacheItem getItem($key)

{@inheritdoc}

Parameters

$key

Return Value

CacheItem

in AbstractAdapter at line line 168
getItems(array $keys = array())

{@inheritdoc}

return \Traversable|CacheItem[]

Parameters

array $keys

in AbstractAdapter at line line 192
save(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

in AbstractAdapter at line line 205
saveDeferred(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

in AbstractAdapter at line line 218
commit()

{@inheritdoc}

in AbstractAdapter at line line 270
__destruct()

in ProxyTrait at line line 27
prune()

{@inheritdoc}

at line line 28
__construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime)

Parameters

CacheInterface $pool
string $namespace
int $defaultLifetime