Memcached Use

Support Wissensdatenbank

Du bist hier:

Use Memcached

Memcached has been installed on all Linux servers since 29 July 2019.

To use Memcached make sure you are using the latest PHP version.

The Memcached Service can only be reached on the local server and uses the standard port 11211.

Here you can find an example script for using Memcached:

<?php
$mem = new memcached();
$mem->addServer("127.0.0.1", 11211);
$result = $mem->get("Test");
if ($result) {
echo $result;
} else {
echo "Test key not found, adding key";
$mem->set("Test", "I found a match, memcache is working") or die("Nothing Saved...");
}
?>
[//code]
War dieser Artikel hilfreich?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Brauchst du Hilfe?
Related Post