| Manuál PHP | ||
|---|---|---|
| PÅ™edcházejÃcà | Dalšà | |
Memcache::setServerParams
(no version information, might be only in CVS)
Memcache::setServerParams -- Changes server parameters and status at runtimePopis
bool Memcache::setServerParams ( string host [, int port [, int timeout [, int retry_interval [, bool status [, callback failure_callback]]]]] )Memcache::setServerParams() changes server parameters at runtime. You can also use the memcache_set_server_params() function.
Poznámka: This function has been added to Memcache version 2.1.0.
Seznam parametrů
hostPoint to the host where memcached is listening for connections.
portPoint to the port where memcached is listening for connections. This parameter is optional and its default value is 11211.
timeoutValue in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
retry_intervalControls how often a failed server will be retried, the default value is 15 seconds. Setting this parameter to -1 disables automatic retry. Neither this nor the
persistentparameter has any effect when the extension is loaded dynamically via dl().statusControls if the server should be flagged as online. Setting this parameter to FALSE and
retry_intervalto -1 allows a failed server to be kept in the pool so as not to affect the key distribution algoritm. Requests for this server will then failover or fail immediatly depending on thememcache.allow_failoversetting. Default to TRUE, meaning the server should be considered online.failure_callbackAllows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attemped. The function takes two parameters, the hostname and port of the failed server.
PÅ™Ãklady
| PÅ™edcházejÃcà | Domů | Dalšà |
| Memcache::setCompressThreshold | Nahoru |