0PricingLogin
PHP Academy · Lesson

Memcached for Session and Object Caching

Use Memcached as a distributed in-memory store for PHP objects.

What is Memcached?

Memcached is a high-performance, distributed, in-memory key-value store. It is widely used for caching database query results and session data in PHP applications.

Installing

Install the Memcached server and the PHP extension.

# Ubuntu/Debian:
$ apt install memcached php-memcached
$ service memcached start

# Verify:
$ php -m | grep memcached

All lessons in this course

  1. Why Caching Matters in PHP
  2. Redis as a PHP Cache Backend
  3. Memcached for Session and Object Caching
  4. Cache Invalidation Patterns
← Back to PHP Academy