SlideShare una empresa de Scribd logo
Memcached y PHP 
Carlos Nacianceno 
El Taller Web
El Taller Web 
• Partners de Zend Technologies 
o Productos 
o Entrenamiento 
o Consultoría 
o Soporte 
El Taller Web
Agenda 
• Qué es Memcached? 
• Extensiones en PHP 
• API de Memcached 
• Preguntas 
Agenda
Memcached
¿Qué es Memcached? 
• Sistema de almacenamiento de caché en memoria 
• Código abierto y libre 
• Primordialmente aceleración de aplicaciones web 
• Evitar carga o procesamiento de datos 
Memcached y PHP
Características 
• Almacenaje Llave-Valor 
• Pequeños datos 
• En memoria 
• Servicio distribuido (Clusters) 
• Clientes en muchos lenguajes 
Memcached y PHP
Instalación 
• RPM , DEB 
• Compilación de fuentes 
• http://memcached.org/latest 
• Configure,make,make install 
Memcached y PHP
Extensiones PHP para Memcached 
• Memcache 
• http://php.net/memcache 
• No tiene dependencias 
• Soporte para sesiones 
• Memcached 
• http://www.php.net/memcached 
• Requiere libmemcached 
• Soporte para sesiones 
• http://code.google.com/p/memcached/wiki/PHPClient 
Comparison 
Memcached y PHP
API de la extension 
Memcached
Añadir servidores 
• Memcached::addServer ( string $host , int $port [, int 
$weight = 0 ] ) 
• Memcached::addServers ( array $servers ) 
• Memcached::getServerList ( void ) 
• Memcached::resetServerList ( void ) 
Memcached y PHP
Guardar datos 
• Memcached::add ( string $key , mixed $value [, int 
$expiration ] ) 
• Memcached::addByKey ( string $server_key , string 
$key , mixed $value [, int $expiration ] ) 
• Memcached::set ( string $key , mixed $value [, int 
$expiration ] ) 
• Memcached::setByKey ( string $server_key , string 
$key , mixed $value [, int $expiration ] ) 
Memcached y PHP
Obtener datos 
• Memcached::get ( string $key [, callable $cache_cb [, 
float &$cas_token ]] ) 
• Memcached::getByKey ( string $server_key , string 
$key [, callable $cache_cb [, float &$cas_token ]] ) 
• Memcached::getMulti ( array $keys [, array 
&$cas_tokens [, int $flags ]] ) 
• Memcached::getMultiByKey ( string $server_key , array 
$keys [, string &$cas_tokens [, int $flags ]] ) 
Memcached y PHP
Obtener datos con retraso 
• Memcached::getDelayed 
• Memcached::fetch 
• Cuando requerimos hacer un proceso o esperar para 
obtener losdatos 
Memcached y PHP
¿Preguntas?
GRACIAS 
info@eltallerweb.com 
@eltallerweb 
@igormx

Más contenido relacionado

PPTX
Hosting
PPTX
Hosting
PPTX
PDF
Tarea 2
PDF
Encuentro desarrolladores
PPTX
Hosting
DOCX
Hosting y dominio
PDF
Homenaje de despedida a Antonio Guevara Manzanares
Hosting
Hosting
Tarea 2
Encuentro desarrolladores
Hosting
Hosting y dominio
Homenaje de despedida a Antonio Guevara Manzanares

Destacado (7)

PPT
Z-Ray en Zend Server 8
PPT
Zend Framework 2 y MongoDB
DOCX
SANTOSH GHOSH resume 2015new
DOCX
PDF
Mongo db enterprise_datasheet
PPT
Webinario mejorando el desempeño con zend server
PPT
Patrones de diseño en POO
Z-Ray en Zend Server 8
Zend Framework 2 y MongoDB
SANTOSH GHOSH resume 2015new
Mongo db enterprise_datasheet
Webinario mejorando el desempeño con zend server
Patrones de diseño en POO
Publicidad

Similar a Memcached y PHP (20)

PDF
Rendimiento extremo en php
PDF
Aceleradores Php Final - Programador PHP
PDF
Aceleradores Php Final - Programador PHP
PDF
Aceleradores PHP Final - Programador PHP
PDF
Optimización de aplicaciones PHP (server side)
PPT
Servidor de prueba wamp
PPT
15.- Servidor php
PPTX
15 servidor php
ODP
Presentaciones
PDF
Programacion - Php
PPTX
PDF
Mi presentacion
PDF
Optimizando Sitios webs con Memcached
PPT
PHP IUTE
PPTX
15.-SERVIDOR PHP
PPTX
Taller php 03 septiembre
PPTX
Taller php 03 septiembre
DOCX
Tutorial php basico
PPTX
Instalar servidor web, php y mysql
 
PPTX
Instalar servidores web y php
 
Rendimiento extremo en php
Aceleradores Php Final - Programador PHP
Aceleradores Php Final - Programador PHP
Aceleradores PHP Final - Programador PHP
Optimización de aplicaciones PHP (server side)
Servidor de prueba wamp
15.- Servidor php
15 servidor php
Presentaciones
Programacion - Php
Mi presentacion
Optimizando Sitios webs con Memcached
PHP IUTE
15.-SERVIDOR PHP
Taller php 03 septiembre
Taller php 03 septiembre
Tutorial php basico
Instalar servidor web, php y mysql
 
Instalar servidores web y php
 
Publicidad

Más de El Taller Web (13)

PPT
Zend/Cache de Zend Framework 2
PPT
Módulos en Zend Framework 2
PPT
Servicios en Zend Framework 2
PDF
PDF
10gen telco white_paper
PDF
Cisco web ex-cs-0511-final
PPT
Replica Sets en MongoDB
PDF
Introducción a Zend Framework 2
PDF
Zend Server Data Caching
PDF
Introducción a PHP 5.4
PDF
TCO Comparison MongoDB & Oracle
PPT
Webinario Operaciones Básicas MongoDB
PPT
Información sobre la certificación Zend
Zend/Cache de Zend Framework 2
Módulos en Zend Framework 2
Servicios en Zend Framework 2
10gen telco white_paper
Cisco web ex-cs-0511-final
Replica Sets en MongoDB
Introducción a Zend Framework 2
Zend Server Data Caching
Introducción a PHP 5.4
TCO Comparison MongoDB & Oracle
Webinario Operaciones Básicas MongoDB
Información sobre la certificación Zend

Último (9)

PDF
AutoCAD Herramientas para el futuro, Juan Fandiño
PPTX
Tratará sobre Grafos_y_Arboles_Presentacion.pptx
PPTX
Implementación equipo monitor12.08.25.pptx
PPTX
Control de seguridad en los sitios web.pptx
PPTX
Conceptos basicos de Base de Datos y sus propiedades
PDF
Presentacion de compiladores e interpretes
PDF
Clase 3 - Presentación visual (Insertando objetos visuales) POWER POINT.pdf
PPTX
ORIGEN DE LA IA - GRADO 1102 INTELIGENCIA
PPTX
Fundamentos de Python - Curso de Python dia 1
AutoCAD Herramientas para el futuro, Juan Fandiño
Tratará sobre Grafos_y_Arboles_Presentacion.pptx
Implementación equipo monitor12.08.25.pptx
Control de seguridad en los sitios web.pptx
Conceptos basicos de Base de Datos y sus propiedades
Presentacion de compiladores e interpretes
Clase 3 - Presentación visual (Insertando objetos visuales) POWER POINT.pdf
ORIGEN DE LA IA - GRADO 1102 INTELIGENCIA
Fundamentos de Python - Curso de Python dia 1

Memcached y PHP

  • 1. Memcached y PHP Carlos Nacianceno El Taller Web
  • 2. El Taller Web • Partners de Zend Technologies o Productos o Entrenamiento o Consultoría o Soporte El Taller Web
  • 3. Agenda • Qué es Memcached? • Extensiones en PHP • API de Memcached • Preguntas Agenda
  • 5. ¿Qué es Memcached? • Sistema de almacenamiento de caché en memoria • Código abierto y libre • Primordialmente aceleración de aplicaciones web • Evitar carga o procesamiento de datos Memcached y PHP
  • 6. Características • Almacenaje Llave-Valor • Pequeños datos • En memoria • Servicio distribuido (Clusters) • Clientes en muchos lenguajes Memcached y PHP
  • 7. Instalación • RPM , DEB • Compilación de fuentes • http://memcached.org/latest • Configure,make,make install Memcached y PHP
  • 8. Extensiones PHP para Memcached • Memcache • http://php.net/memcache • No tiene dependencias • Soporte para sesiones • Memcached • http://www.php.net/memcached • Requiere libmemcached • Soporte para sesiones • http://code.google.com/p/memcached/wiki/PHPClient Comparison Memcached y PHP
  • 9. API de la extension Memcached
  • 10. Añadir servidores • Memcached::addServer ( string $host , int $port [, int $weight = 0 ] ) • Memcached::addServers ( array $servers ) • Memcached::getServerList ( void ) • Memcached::resetServerList ( void ) Memcached y PHP
  • 11. Guardar datos • Memcached::add ( string $key , mixed $value [, int $expiration ] ) • Memcached::addByKey ( string $server_key , string $key , mixed $value [, int $expiration ] ) • Memcached::set ( string $key , mixed $value [, int $expiration ] ) • Memcached::setByKey ( string $server_key , string $key , mixed $value [, int $expiration ] ) Memcached y PHP
  • 12. Obtener datos • Memcached::get ( string $key [, callable $cache_cb [, float &$cas_token ]] ) • Memcached::getByKey ( string $server_key , string $key [, callable $cache_cb [, float &$cas_token ]] ) • Memcached::getMulti ( array $keys [, array &$cas_tokens [, int $flags ]] ) • Memcached::getMultiByKey ( string $server_key , array $keys [, string &$cas_tokens [, int $flags ]] ) Memcached y PHP
  • 13. Obtener datos con retraso • Memcached::getDelayed • Memcached::fetch • Cuando requerimos hacer un proceso o esperar para obtener losdatos Memcached y PHP