v5:userguide:learn_caching:memcached
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:userguide:learn_caching:memcached [2016/03/29 00:44] – [Memcached Setup] mnewnham | v5:userguide:learn_caching:memcached [2018/07/16 20:18] (current) – start functions lowercase peterdd | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | + | <- v5: | |
- | <- v5: | + | |
~~NOTOC~~ | ~~NOTOC~~ | ||
+ | |||
====== Memcached Setup ====== | ====== Memcached Setup ====== | ||
- | Memcached provides a controlled, server based memory caching service. The server is reasonably easily configured and installed, but provides a sophisticated caching configuration. PHP support for the library is available through the PHP PEAR memcached library. For larger environments, | + | < |
- | <WRAP tip> | + | == Learn More == |
- | There are 2 pear modules for connection to a Memcached server, the older [[https://pecl.php.net/package/ | + | [[https://memcached.org/|Configuring |
- | * Windows support is only available for the older Memcache library. | + | |
- | * ADOdb has only been tested against the older library | + | |
</ | </ | ||
- | ===== Description ===== | + | |
- | This section describes connection to an already configured Memcache | + | [[wp> |
+ | |||
+ | Your platform and PHP version will be the primary decision factors between using // | ||
+ | |||
+ | ^ Platform | ||
+ | | Windows | ||
+ | | Unix | 5.x | ::: | | ||
+ | | ::: | 7.x | [[https:// | ||
+ | |||
+ | It's also worth noting that compression is not supported with // | ||
+ | |||
+ | For larger environments, | ||
+ | |||
+ | ---------------------------------------------- | ||
===== Usage ===== | ===== Usage ===== | ||
Line 16: | Line 27: | ||
$db = NewADOConnection($driver=' | $db = NewADOConnection($driver=' | ||
+ | |||
/* | /* | ||
- | * Enable memcache | + | * Enable memcache |
- | */ | + | */ |
$db-> | $db-> | ||
+ | |||
/* | /* | ||
- | * Add one or more servers, for use in distributed systems | + | * Add one or more servers, for use in distributed systems |
- | */ | + | */ |
$db-> | $db-> | ||
+ | |||
/* | /* | ||
- | * Optionally add the server port if it differs from the default | + | * Optionally add the server port if it differs from the default |
- | */ | + | */ |
$db-> | $db-> | ||
+ | |||
/* | /* | ||
- | * Use ' | + | * Use ' |
- | */ | + | * Note; Compression is only supported using the memcache library. This |
- | $db-> | + | |
+ | */ | ||
+ | $db-> | ||
/* | /* | ||
- | * We connect to the database, not the memcache server | + | * We connect to the database, not the memcache server |
- | */ | + | */ |
- | $db->Connect(' | + | $db->connect(' |
</ | </ | ||
+ |
v5/userguide/learn_caching/memcached.1459205080.txt.gz · Last modified: 2017/04/21 11:40 (external edit)