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:reference:memcached [2016/01/13 02:31] – ↷ Page moved from reference:memcached to v5:reference:memcached mnewnham | v5:userguide:memcached [2017/04/18 10:26] – [Memcached Setup] add wikipedia link, formatting, minor rewording dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Memcached Setup ====== | ====== Memcached Setup ====== | ||
+ | |||
<WRAP tip> | <WRAP tip> | ||
- | There are 2 pear modules for connection | + | There are 2 PEAR modules for connecting |
- | * Windows support is only available for the older Memcache library. | + | * Windows support is only available for the //Memcache// library. |
- | * ADOdb has only been tested against the older library | + | * // |
+ | * // | ||
+ | * If both libraries are available, // | ||
</ | </ | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
- | This section describes | + | This section describes |
===== The Memcache Library ===== | ===== The Memcache Library ===== | ||
Line 14: | Line 18: | ||
$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-> | ||
/* | /* | ||
- | * look for a cached query with a life of 2400 seconds | + | * look for a cached query with a life of 2400 seconds |
- | */ | + | */ |
$sql = ' | $sql = ' | ||
$db-> | $db-> | ||
Line 44: | Line 54: | ||
</ | </ | ||
===== Using Debug Mode ===== | ===== Using Debug Mode ===== | ||
- | The size of query results that can be cached by the memcached server is limited by server configuration. The default is quite small. If the query is too large, and [[reference: | + | The size of query results that can be cached by the memcached server is limited by server configuration. The default is quite small. If the query is too large, and [[v5: |
Line 50: | Line 60: | ||
(this is a notice and not an error) | (this is a notice and not an error) | ||
-----< | -----< | ||
- | | + | |
- | (mysqli): SELECT * FROM employees | + | (mysqli): SELECT * FROM employees |
- | + | ||
-----< | -----< | ||
Notice: MemcachePool:: | Notice: MemcachePool:: | ||
Line 58: | Line 68: | ||
(3) in C: | (3) in C: | ||
Failed to save data at the memcached server! | Failed to save data at the memcached server! | ||
- | | + | |
Cache write error | Cache write error | ||
- | | + | |
PHP Notice: | PHP Notice: | ||
- | SERVER_ERROR object too large for cache (3) | + | SERVER_ERROR object too large for cache (3) |
in C: | in C: | ||
- | | + | |
ADOdb currently has no mechanism for splitting large queries into smaller chunks. | ADOdb currently has no mechanism for splitting large queries into smaller chunks. | ||
{{tag> | {{tag> | ||
+ |
v5/userguide/memcached.txt · Last modified: 2022/03/29 18:29 by dregad