Client
class Client extends Client
Memcache-Client
Constants
DELIMITER |
Text lines are always terminated by \r\n. Unstructured data is also terminated by \r\n, even though \r, \n or any other 8-bit characters may also appear inside the data. Therefore, when a client retrieves data from a server, it must use the length of the data block (which it will be provided with) to determine where the data block ends, and not the fact that \r\n follows the end of the data block, even though it does. |
ERROR |
"ERROR\r\n" means the client sent a nonexistent command name. |
CLIENT_ERROR |
"CLIENT_ERROR means some sort of client error in the input line, i.e. the input
doesn't conform to the protocol in some way. |
SERVER_ERROR |
"SERVER_ERROR means some sort of server error prevents the server from carrying
out the command. |
STORED |
"STORED\r\n", to indicate success. |
NOT_STORED |
"NOT_STORED\r\n" to indicate the data was not stored, but not because of an error. This normally means that the condition for an "add" or a "replace" command wasn't met. |
EXISTS |
"EXISTS\r\n" to indicate that the item you are trying to store with a "cas" command has been modified since you last fetched it. |
NOT_FOUND |
"NOT_FOUND\r\n" to indicate that the item you are trying to store with a "cas" command did not exist. |
TOUCHED |
"TOUCHED\r\n" to indicate success |
DELETED |
"DELETED\r\n" to indicate success |
VERSION |
Antwort und Befehl; Unterscheidet sich nur im Case Siehe Funktion getVersion() |
OK |
"OK\r\n" in response (unless "noreply" is given as the last parameter) |
END |
END |
QUIT |
Befehl |
SET |
Befehl |
ADD |
Befehl |
FLUSH_ALL |
Befehl |
REPLACE |
Befehl |
APPEND |
Befehl |
PREPEND |
Befehl |
DELETE |
Befehl |
TOUCH |
Befehl |
GET |
Befehl |
GETS |
Mehrere Keys |
VALUE |
Rückantwort |
Methods
sendStorageCommandAndReceive
Senden von get-Anfragen
Internes Verarbeiten der Standard-Antworten
Eintrag löschen
Antwort parsen
Wert holen
Wert um die Daten ergänzen
Wert um die Daten ergänzen
Wert setzen, wenn er nocht nicht gesetzt wurde
Wert setzen nur dann, wenn der Wert bereits existiert
Wert setzen
touch
FLUSH ALL
Memcached-Server-Version
Verbindung trennen
Ergebnis vom Server
Details
at line 222
protected string
sendStorageCommandAndReceive(string $command, string $key, string $data, integer $expireTime = null, integer $flags = 0, boolean $noReply = false)
sendStorageCommandAndReceive
"set" means "store this data".
"add" means "store this data, but only if the server doesn't already hold data for this key".
"replace" means "store this data, but only if the server does already hold data for this key".
"append" means "add this data to an existing key after existing data".
"prepend" means "add this data to an existing key before existing data".
"noreply" optional parameter instructs the server to not send the reply. NOTE: if the request line is malformed, the server can't parse "noreply" option reliably. In this case it may send the error to the client, and not reading it on the client side will break things. Client should construct only valid requests.
at line 275
protected $this
sendRetrievalCommand(string $command, string $key)
Senden von get-Anfragen
at line 304
protected array
parseStandardAnswer(type $response)
Internes Verarbeiten der Standard-Antworten
at line 339
string
delete(string $key)
Eintrag löschen
at line 366
protected boolean|Map
parseValuesAnswer(type $response)
Antwort parsen
at line 407
Map
get(string $key)
Wert holen
Mehrere Werte können durch leerzeichen übergeben werden.
at line 433
string
prepend(string $key, string $data, integer $expireTime = null, integer $flags = null)
Wert um die Daten ergänzen
"prepend" means "add this data to an existing key before existing data".
at line 451
string
append(string $key, string $data, integer $expireTime = null, integer $flags = null)
Wert um die Daten ergänzen
"append" means "add this data to an existing key after existing data".
at line 469
string
add(string $key, string $data, integer $expireTime = null, integer $flags = null)
Wert setzen, wenn er nocht nicht gesetzt wurde
"add" means "store this data, but only if the server doesn't already hold data for this key".
at line 487
string
replace(string $key, string $data, integer $expireTime = null, integer $flags = null)
Wert setzen nur dann, wenn der Wert bereits existiert
"replace" means "store this data, but only if the server does already hold data for this key".
at line 505
string
set(string $key, string $data, integer $expireTime = null, integer $flags = null)
Wert setzen
"set" means "store this data".
at line 519
string
touch(string $key, integer $expireTime = null)
touch
at line 545
string
flushAll($delay = null)
FLUSH ALL
at line 569
string
getVersion()
Memcached-Server-Version
at line 587
$this
quit()
Verbindung trennen
at line 598
protected string
getResponse()
Ergebnis vom Server