Memcached Use

Support Wissensdatenbank

Du bist hier:
Print

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...");
}
?>
War dieser Artikel hilfreich?
0.5 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 100%
Wie können wir diesen Artikel verbessern?
Please submit the reason for your vote so that we can improve the article.
Brauchst du Hilfe?
Related Post