v5:userguide:learn_caching: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:learn_caching:memcached [2016/03/29 00:44] – [Memcached Setup] mnewnham | v5:userguide:learn_caching:memcached [2017/04/15 18:28] – mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | + | <- v5: | |
- | <- v5: | + | |
~~NOTOC~~ | ~~NOTOC~~ | ||
- | ====== Memcached Setup ====== | + | <WRAP right tip box 300px> |
- | 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 | + | == Learn More == |
- | <WRAP tip> | + | [[https://memcached.org/ |
- | There are 2 pear modules for connection to a Memcached server, the older [[https:// | + | [[https:// |
- | * Windows support is only available for the older Memcache library. | + | [[https:// |
- | * ADOdb has only been tested against the older library | + | |
</ | </ | ||
- | ===== Description | + | ====== Memcached Setup ====== |
- | This section describes connection to an already configured Memcache | + | Memcached provides a controlled, |
+ | |||
+ | Your platform and PHP version will be the primary decision factors between using memcache or memcached. | ||
+ | |||
+ | ^ Platform | ||
+ | | Windows | ||
+ | | Unix | 5.x | memcache | ||
+ | | Unix | 7.x | memcached | | ||
+ | |||
+ | It's also worth noting that compression is not supported with memcached. If you need cache compression, | ||
+ | For larger environments, | ||
+ | ---------------------------------------------- | ||
===== Usage ===== | ===== Usage ===== | ||
<code php> | <code php> | ||
$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-> | $db-> | ||
- | |||
</ | </ | ||
+ |
v5/userguide/learn_caching/memcached.txt · Last modified: 2018/07/16 20:18 by peterdd