Zed. The source code to build a world.

CacheMemcached
in package

Memcached cache

!!! This class uses the Memcached extension AND NOT the Memcache ext !!!!

References:

Tags
link
http://www.php.net/manual/en/book/memcached.php
link

This class implements a singleton pattern.

Table of Contents

Properties

$instance  : CacheMemcached
The current cache instance
$memcached  : Memcached
The Memcached object

Methods

delete()  : mixed
Deletes the specified key's data
get()  : mixed
Gets the specified key's data
load()  : Cache
Gets the cache instance, initializing it if needed
set()  : mixed
Sets the specified data at the specified key

Properties

$memcached

The Memcached object

private Memcached $memcached = \null

Methods

delete()

Deletes the specified key's data

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

the key to delete

get()

Gets the specified key's data

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

the key to fetch

Return values
mixed

the data at the specified key

load()

Gets the cache instance, initializing it if needed

public static load() : Cache
Return values
Cache

the cache instance, or null if nothing is cached

set()

Sets the specified data at the specified key

public set(string $key, mixed $value) : mixed
Parameters
$key : string

the key where to store the specified data

$value : mixed

the data to store


        
On this page

Search results