It helps to know that for this extension to work, you need a server with 'Memcached' (a service independent of PHP) installed and running as a service.
The documentation herein refers a lot to 'memcache_host'. This is not an arbitrary string, but should be a host name (eg localhost) or an IP address of a server running memcached.
If you have just installed the php memcache extension then you will not necessarily have memcached installed as well
La clase Memcache
(PECL memcache >= 0.2.0)
Introducción
Representa una conexión a un conjunto de servidores memcache.
Sinopsis de la Clase
Memcache
{
bool addServer
( string
$host
[, int $port = 11211
[, bool $persistent
[, int $weight
[, int $timeout
[, int $retry_interval
[, bool $status
[, callable $failure_callback
[, int $timeoutms
]]]]]]]] )
bool setServerParams
( string
}$host
[, int $port = 11211
[, int $timeout
[, int $retry_interval = false
[, bool $status
[, callable $failure_callback
]]]]] )Tabla de contenidos
- Memcache::add — Añadir un valor en el servidor
- Memcache::addServer — Añadir servidor memcache al grupo de conexiones
- Memcache::close — Cierra la conexión al servidor memcached
- Memcache::connect — Abre una conexión al servidor memcached
- Memcache::decrement — Decrementa numéricamente un valor
- Memcache::delete — Elimina un valor del servidor
- Memcache::flush — Limpia todos los valores existentes en el servidor
- Memcache::get — Obtener valor del servidor
- Memcache::getExtendedStats — Obtener estadísticas de todos los servidores en el grupo
- Memcache::getServerStatus — Devuelve el estado del servidor
- Memcache::getStats — Obtiene estadísticas del servidor
- Memcache::getVersion — Devuelve la versión del servidor
- Memcache::increment — Incrementa numéricamente un valor
- Memcache::pconnect — Abre una conexión persistente a memcached
- Memcache::replace — Reemplaza el valor de un valor existente
- Memcache::set — Guarda datos en el servidor
- Memcache::setCompressThreshold — Activa compresión automática de valores con datos largos
- Memcache::setServerParams — Cambia parámetros del servidor y estado en tiempo de ejecucción
chris at NOSPAM dot xeneco dot co dot uk ¶
5 months ago
