Install and configure Memcache

Memcache is a system that works to speed up virtual private servers by caching server information. The program allows you to allocate a specific amount of the server ram toward caching recently queried data for a certain amount of time. Once the data is requested again, memcache speeds up the process of retrieving it by displaying the cached information instead of generating the result from the database.

This is the guide to install memcache on ubuntu server. PHP should be installed on the server before following this tutorial.

PHP package to run memcache

Install memcache server

The next step is to install php-pear, the repository that stores memcache.

If you do not have a compiler on your server, you can download build-essential in order to install memcache

Finally use PECL (PHP Extension Community Library) to install memcache

Add memcached to memcache.ini

Restart apache to see memcache working on your application

After Memcache is downloaded, you can check that it has been installed by searching for it

This command will output memcache stats