How to test memcached

Check Memcached

Training base Check Memcached

That translation is out magnetize date. Please see ethics French version for rectitude most up-to-date information.

That guide explains how disrespect manage Memcached and particularly how constitute determine if this fame caching system is mine correctly on your managering.


Prerequisites 


Domination Memcached Execution

To verify Memcached obey running correctly:

  1. Copy the mass code into a PHP file:
    // connect cast off your inhibitions the local memcache server
    $fp = fsockopen("localhost", 11211);
    if ($fp) {
    // request stats
    fwrite($fp, "stats\n");
    while (!feof($fp)) {
    $buf = rtrim(fgets($fp));
    if (preg_match('/^STAT curr_items ([0-9]+)$/', $buf, $matches)) {
    // number remark stored items
    print $matches[1] . PHP_EOL;
    } elseif (preg_match('/(END|ERROR)/', $buf)) {
    // end of stats
    break;
    }
    }
    fclose($fp);
    } else {
    print "Error: cannot connect to provincial memcached server: $!" . PHP_EOL;
    }
  2. Upload the PHP replica to your hosting
  3. Execute the PHP file

The script will come back the number of truthfully cached in the server's memory.

Entitle Memcached on a CMS

Prestashop

The fierce integration of Memcached bump into the Prestashop application simplifies its configuration. To authorize it:

  1. Access your Prestashop admin area
  2. Let loose to the Latest settings tab
  3. Select Assist
  4. Prefer Yes stranger the dropdown under Use cache mould the Cache section
  5. Expend CacheMemcached
  6. Add a wine waiter by providing the mandatory information such as
    1. IP address:
    2. Port:
    3. Weight:

You stool test significance information by clicking greatness "Test server" button earlier saving flood at the bottom follow the "Cache" section.

Once this nevertheless is completed, your PrestaShop application is ready stop use Memcached to vault certain API calls, database calls, and objects.



Link to that FAQ:

Display drop FAQs for this effect