How to Use Memcached
How to Use Memcached
The Memcached system is employed by high-traffic websites such as YouTube, Facebook, and Twitter, providing fast data caching to improve performance. It is also supported by popular CMS platforms like WordPress, Joomla, and Drupal.
To use Memcached with PHP, enable the Memcached extension via your hosting control panel:
- Navigate to Advanced → PHP Settings
- Edit php.ini and turn memcached On
If your plan doesn’t include Memcached instances, you can purchase them as an upgrade through the Add/Upgrade service(s) section of the hosting control panel. Each instance includes 16 MB of memory, enabling efficient caching for your application.
To configure Memcached, use the following details:
Memcached Hostname (IP): unix:///home/sys/memcached.sock
Memcached Port: 0
Example code for PHP:
$memcached->addServer('unix:///home/sys/memcached.sock', 0);


Leave your comment