SDK for PHP 3.x

CacheInterface
in

Represents a simple cache interface.

Table of Contents

Methods

get()  : mixed|null
Get a cache item by key.
remove()  : mixed
Remove a cache key.
set()  : mixed
Set a cache key value.

Methods

get()

Get a cache item by key.

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

Key to retrieve.

Return values
mixed|null

Returns the value or null if not found.

remove()

Remove a cache key.

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

Key to remove.

set()

Set a cache key value.

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

Key to set

$value : mixed

Value to set.

$ttl : int = 0

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

On this page