Class MemcachedStorage (namespace Nette\Caching)


Memcached storage.

Object
   |
   --MemcachedStorage

Implements interfaces:

ICacheStorage
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Caching/MemcachedStorage.php (line 38)
Constructor Summary
public
__construct ([$host = 'localhost'], [$port = 11211], [$prefix = ''])
Method Summary
bool
clean ($conds)
Removes items from the cache by conditions & garbage collector.
static bool
Checks if Memcached extension is available.
mixed|NULL
read (string $key)
Read from cache.
bool
remove (string $key)
Removes item from the cache.
bool
write (string $key, mixed $data, $dp)
Writes item into the cache.
Methods Inherited From Object
Object::extensionMethod(), Object::getClass(), Object::getReflection(), Object::__call(), Object::__callStatic(), Object::__get(), Object::__isset(), Object::__set(), Object::__unset()
Constant Summary
string META_CONSTS 'consts'

line 41

internal cache structure
string META_DATA 'data'

line 42

internal cache structure
string META_DELTA 'delta'

line 43

internal cache structure
string META_FILES 'df'

line 44

internal cache structure
Variable Summary
protected Memcache $memcache

line 48

protected string $prefix

line 51


Constructor Details

line 66

__construct

public __construct ([$host = 'localhost'], [$port = 11211], [$prefix = ''])

Input
$host
$port
$prefix
Method Details

line 190

clean

public bool clean ($conds)

Removes items from the cache by conditions & garbage collector.

Implementation of:

Input
$conds conditions
Output
bool TRUE if no problem

line 59

isAvailable

public static bool isAvailable ()

Checks if Memcached extension is available.

Output
bool  

line 84

read

public mixed|NULL read (string $key)

Read from cache.

Implementation of:

Input
string $key key
Output
mixed|NULL  

line 178

remove

public bool remove (string $key)

Removes item from the cache.

Implementation of:

Input
string $key key
Output
bool TRUE if no problem

line 134

write

public bool write (string $key, mixed $data, $dp)

Writes item into the cache.

Implementation of:

Input
string $key key
mixed $data data
$dp dependencies
Output
bool TRUE if no problem