« Memcached » : différence entre les versions
Aucun résumé des modifications |
|||
| (Une version intermédiaire par le même utilisateur non affichée) | |||
| Ligne 84 : | Ligne 84 : | ||
<syntaxhighlight lang="bash">sudo apt update | <syntaxhighlight lang="bash">sudo apt update | ||
sudo apt install php-pear php8.3-dev libmemcached-dev build-essential | sudo apt install php-pear php8.3-dev libmemcached-dev build-essential zlib1g-dev | ||
sudo pecl install memcached</syntaxhighlight> | sudo pecl install memcached</syntaxhighlight> | ||
Pendant l’installation, PECL peut demander des options (compression, SASL). Tu peux laisser les valeurs par défaut si tu n’as pas besoin d’authentification. | Pendant l’installation, PECL peut demander des options (compression, SASL). Tu peux laisser les valeurs par défaut si tu n’as pas besoin d’authentification. | ||
| Ligne 108 : | Ligne 108 : | ||
Dans <code>LocalSettings.php</code>, utilise l’implémentation PECL : | Dans <code>LocalSettings.php</code>, utilise l’implémentation PECL : | ||
<syntaxhighlight lang="php">$wgMainCacheType | <syntaxhighlight lang="php"> | ||
$wgParserCacheType | $wgMainCacheType = CACHE_MEMCACHED; | ||
$wgMessageCacheType = | $wgParserCacheType = CACHE_MEMCACHED; | ||
$wgSessionCacheType = | $wgMessageCacheType = CACHE_MEMCACHED; | ||
$wgSessionCacheType = CACHE_MEMCACHED; | |||
$wgMemCachedServers = [ '127.0.0.1:11211' ];</syntaxhighlight> | $wgMemCachedServers = [ '127.0.0.1:11211' ];</syntaxhighlight> | ||
<blockquote>'''Pourquoi ?'''<br /> | <blockquote>'''Pourquoi ?'''<br /> | ||