# Memcached Class Reference
[Application-wide cache subsystem]

Memcached-based cache. More...

Inheritance diagram for Memcached:
[legend]

List of all members.

## Public Member Functions

| __construct ($host=Memcached::DEFAULT_HOST, $port=Memcached::DEFAULT_PORT, $buffer=Memcached::DEFAULT_BUFFER)
| __destruct ()
| clean ()
| getList ($indexes)
| increment ($key, $value)
| decrement ($key, $value)
| get ($index)
| delete ($index, $time=null)
| append ($key, $data)

## Static Public Member Functions

static | create ($host=Memcached::DEFAULT_HOST, $port=Memcached::DEFAULT_PORT, $buffer=Memcached::DEFAULT_BUFFER)

## Public Attributes

const | DEFAULT_PORT = 11211
const | DEFAULT_HOST = '127.0.0.1'
const | DEFAULT_BUFFER = 16384

## Protected Member Functions

| store ($method, $index, $value, $expires=Cache::EXPIRES_MINIMUM)

## Private Member Functions

| parseGetRequest ($single)
| changeInteger ($command, $key, $value)
| sendRequest ($command)

## Private Attributes

| $link = null
| $buffer = Memcached::DEFAULT_BUFFER

## Detailed Description

Memcached-based cache.

See also:
  http://www.danga.com/memcached/

Definition at line 23 of file Memcached.class.php.

## Constructor & Destructor Documentation

Memcached::__construct | ( | $ | host = `Memcached::DEFAULT_HOST`,
|  | $ | port = `Memcached::DEFAULT_PORT`,
|  | $ | buffer = `Memcached::DEFAULT_BUFFER` |
| ) |  |  |

Definition at line 45 of file Memcached.class.php.

References $buffer.

Memcached::__destruct | ( |  | ) |

Definition at line 64 of file Memcached.class.php.

## Member Function Documentation

Memcached::append | ( | $ | key,
|  | $ | data |
| ) |  |  |

Reimplemented from CachePeer.

Definition at line 154 of file Memcached.class.php.

References sendRequest().

Here is the call graph for this function:

Memcached::changeInteger | ( | $ | command,
|  | $ | key,
|  | $ | value |
| ) |  |  | `[private]`

Definition at line 294 of file Memcached.class.php.

References sendRequest().

Referenced by decrement(), and increment().

Here is the call graph for this function:

Memcached::clean | ( |  | ) |

Returns:
  Memcached

Reimplemented from CachePeer.

Definition at line 74 of file Memcached.class.php.

References sendRequest().

Here is the call graph for this function:

static Memcached::create | ( | $ | host = `Memcached::DEFAULT_HOST`,
|  | $ | port = `Memcached::DEFAULT_PORT`,
|  | $ | buffer = `Memcached::DEFAULT_BUFFER` |
| ) |  |  | `[static]`

Returns:
  Memcached

Examples:
  cacheSettings.php.

Definition at line 36 of file Memcached.class.php.

References $buffer.

Memcached::decrement | ( | $ | key,
|  | $ | value |
| ) |  |  |

Reimplemented from CachePeer.

Definition at line 112 of file Memcached.class.php.

References changeInteger().

Here is the call graph for this function:

Memcached::delete | ( | $ | index,
|  | $ | time = `null` |
| ) |  |  |

Definition at line 132 of file Memcached.class.php.

References sendRequest().

Here is the call graph for this function:

Memcached::get | ( | $ | index | ) |

Reimplemented from CachePeer.

Definition at line 117 of file Memcached.class.php.

References parseGetRequest(), and sendRequest().

Here is the call graph for this function:

Memcached::getList | ( | $ | indexes | ) |

Reimplemented from CachePeer.

Definition at line 89 of file Memcached.class.php.

References parseGetRequest(), and sendRequest().

Here is the call graph for this function:

Memcached::increment | ( | $ | key,
|  | $ | value |
| ) |  |  |

Reimplemented from CachePeer.

Definition at line 107 of file Memcached.class.php.

References changeInteger().

Here is the call graph for this function:

Memcached::parseGetRequest | ( | $ | single | ) | `[private]`

Definition at line 226 of file Memcached.class.php.

Referenced by get(), and getList().

Memcached::sendRequest | ( | $ | command | ) | `[private]`

Definition at line 316 of file Memcached.class.php.

Referenced by append(), changeInteger(), clean(), delete(), get(), getList(), and store().

Memcached::store | ( | $ | method,
|  | $ | index,
|  | $ | value,
|  | $ | expires = `Cache::EXPIRES_MINIMUM` |
| ) |  |  | `[protected]`

Reimplemented from CachePeer.

Definition at line 174 of file Memcached.class.php.

References Assert::checkFloat(), Cache::DO_NOT_CACHE, and sendRequest().

Here is the call graph for this function:

## Member Data Documentation

Memcached::$buffer = Memcached::DEFAULT_BUFFER `[private]`

Definition at line 31 of file Memcached.class.php.

Referenced by __construct(), and create().

Memcached::$link = null`[private]`

Definition at line 29 of file Memcached.class.php.

const Memcached::DEFAULT_BUFFER = 16384

Definition at line 27 of file Memcached.class.php.

const Memcached::DEFAULT_HOST = '127.0.0.1'

Definition at line 26 of file Memcached.class.php.

const Memcached::DEFAULT_PORT = 11211

Definition at line 25 of file Memcached.class.php.

The documentation for this class was generated from the following file:

- core/Cache/Memcached.class.php