WEB HOSTING SUPPORT NETWORK
     
 

Memcached Object Cache

Memcached is a high-performance, distributed memory object caching system. It acts as an in-memory key-value store for small chunks of arbitrary data (strings, objects) such as the results of database calls, API calls, or page rendering. Memcached can improve the speed of your website or application by providing quick access to frequently accessed data.

Memcached is fully integrated into the Control Panel through a dedicated Memcached Object Cache section.

 

Create a Memcached instance

If Memcached has been purchased as an upgrade option, the Memcached instance is created automatically.

On plans with WebApps support, no separate Memcached purchase is required. To start using Memcached, open the Memcached Object Cache section in the Control Panel, click Create, and choose the memory size for the instance.

If you are not sure whether Memcached is included in your hosting plan, please contact us and we will be glad to assist you.

Connect an application to Memcached

You can use Memcached with any application that supports Memcached connections. The application must be configured to connect to Memcached through a Unix socket.

  1. Open the Memcached Object Cache section in the Control Panel.
  2. Locate the Memcached instance you want to use.
  3. Click the socket path, marked with a power plug icon, to copy it to the clipboard:

    Memcached Socket
  4. Use the copied socket path in your application's Memcached configuration.

Note: If your application uses PHP, you must enable the Memcached PHP extension. To do this, open the PHP Settings section in the Control Panel and click Manage (gear icon) for the subdomain you want to configure (for the main website, this is the www subdomain). On the PHP settings page, enable the Memcached extension and then click Save changes.

Purge the Memcached cache

Purging the cache can be useful after major content changes, configuration updates, or when troubleshooting. To purge the cache:

  1. Open the Memcached Object Cache section in the Control Panel.
  2. Locate the Memcached instance you want to manage.
  3. Click Purge next to that instance.

This removes the currently cached data from the selected Memcached instance. The Memcached instance itself remains active and your application can continue using it.

Start or stop a Memcached instance

You can start or stop a Memcached instance at any time:

  1. Open the Memcached Object Cache section in the Control Panel.
  2. Locate the Memcached instance you want to manage.
  3. Click Start or Stop next to that instance.

Warning: If you stop a Memcached instance, any applications that use it may stop working until the instance is started again.

Memcached instance status

The Status column shows the current condition of the Memcached instance based on its memory usage and cache activity:

Memcached Status

  • Healthy - The current memory allocation is sufficient for the present workload.
  • Moderate - The cache usage is approaching the current memory allocation. Monitor the hit rate and evictions to maintain optimal performance.
  • Strained - The cache is near capacity and evicting items. The current memory allocation may be insufficient for the present workload. Consider increasing the memory allocation if this status continues.

Click View stats to view the instance statistics. The statistics window shows the current status of the instance and key metrics such as memory usage, hit rate, evictions, connections, and items. It also includes charts for memory usage and cache efficiency, helping you assess whether the current memory allocation is sufficient.