Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

SDK for PHP 3.x

DoctrineCacheAdapter
in package
implements CacheInterface, Cache

Table of Contents

Interfaces

CacheInterface
Represents a simple cache interface.
Cache

Methods

__construct()  : mixed
contains()  : bool
delete()  : bool
fetch()  : mixed
get()  : mixed|null
Get a cache item by key.
getStats()  : array<string|int, mixed>|null
remove()  : mixed
Remove a cache key.
save()  : bool
set()  : mixed
Set a cache key value.

Methods

__construct()

public __construct(Cache $cache) : mixed
Parameters
$cache : Cache

contains()

public contains(mixed $key) : bool
Parameters
$key : mixed
Return values
bool

delete()

public delete(mixed $key) : bool
Parameters
$key : mixed
Return values
bool

fetch()

public fetch(mixed $key) : mixed
Parameters
$key : mixed

get()

Get a cache item by key.

public get(mixed $key) : mixed|null
Parameters
$key : mixed

Key to retrieve.

Return values
mixed|null

Returns the value or null if not found.

getStats()

public getStats() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

remove()

Remove a cache key.

public remove(mixed $key) : mixed
Parameters
$key : mixed

Key to remove.

save()

public save(mixed $key, mixed $value[, mixed $ttl = 0 ]) : bool
Parameters
$key : mixed
$value : mixed
$ttl : mixed = 0
Return values
bool

set()

Set a cache key value.

public set(mixed $key, mixed $value[, mixed $ttl = 0 ]) : mixed
Parameters
$key : mixed

Key to set

$value : mixed

Value to set.

$ttl : mixed = 0

Number of seconds the item is allowed to live. Set to 0 to allow an unlimited lifetime.

On this page