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:
- 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;
} - Upload the PHP replica to your hosting
- 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:
- Access your Prestashop admin area
- Let loose to the Latest settings tab
- Select Assist
- Prefer Yes stranger the dropdown under Use cache mould the Cache section
- Expend CacheMemcached
- Add a wine waiter by providing the mandatory information such as
- IP address:
- Port:
- 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