v5:userguide:memcached
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
v5:userguide:memcached [2017/04/18 10:32] – [Using Debug Mode] fix formatting (use code block) dregad | v5:userguide:memcached [2021/01/25 02:30] – mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Memcached Setup ====== | ====== Memcached Setup ====== | ||
+ | ===== Description ===== | ||
+ | This section describes connecting to an already configured Memcache server. Information about installation and configuration of Memcached servers can be found [[https:// | ||
+ | |||
+ | ===== The Memcache Library ===== | ||
+ | There are 2 distinct PEAR modules for connecting to a [[wp> | ||
<WRAP tip> | <WRAP tip> | ||
- | There are 2 PEAR modules for connecting to a [[wp> | ||
* Windows support is only available for the // | * Windows support is only available for the // | ||
* // | * // | ||
Line 8: | Line 12: | ||
* If both libraries are available, // | * If both libraries are available, // | ||
</ | </ | ||
- | + | ===== Why can't I use the memcached library under Windows? | |
- | ===== Description | + | The memcached library is much more heavily featured, more modern |
- | This section describes connecting to an already configured Memcache server. Information about installation | + | |
- | ===== The Memcache Library ===== | + | |
Line 53: | Line 55: | ||
</ | </ | ||
+ | ===== Adding Weighted Server Groups ===== | ||
+ | From ADOdb version 5.22, the **memcached** library supports the use of **// | ||
+ | |||
+ | <code php> | ||
+ | array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | </ | ||
+ | |||
+ | The host arrays are then combined together. In this example 86.91 serves 70% of requests and 86.92 serves 30% | ||
+ | <code php> | ||
+ | |||
+ | $hosts = array( | ||
+ | array(' | ||
+ | array(' | ||
+ | ); | ||
+ | |||
+ | $db = NewADOConnection($driver=' | ||
+ | |||
+ | /* | ||
+ | * Enable memcache | ||
+ | */ | ||
+ | $db-> | ||
+ | |||
+ | /* | ||
+ | * Add the weighted servers | ||
+ | */ | ||
+ | $db-> | ||
+ | |||
+ | </ | ||
+ | |||
===== Using Debug Mode ===== | ===== Using Debug Mode ===== | ||
v5/userguide/memcached.txt · Last modified: 2022/03/29 18:29 by dregad