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 memcachedAll lessons in this course
- Why Caching Matters in PHP
- Redis as a PHP Cache Backend
- Memcached for Session and Object Caching
- Cache Invalidation Patterns