Folgende Konstanten werden von dieser Erweiterung definiert und stehen nur zur Verfügung, wenn die Erweiterung entweder statisch in PHP kompiliert oder dynamisch zur Laufzeit geladen wurde.
Memcached::OPT_COMPRESSIONEnables or disables payload compression. When enabled, item values longer than a certain threshold (currently 100 bytes) will be compressed during storage and decompressed during retrieval transparently.
Type: boolean, default: TRUE.
Memcached::OPT_SERIALIZER
Specifies the serializer to use for serializing non-scalar values.
The valid serializers are Memcached::SERIALIZER_PHP
or Memcached::SERIALIZER_IGBINARY. The latter is
supported only when memcached is configured with
--enable-memcached-igbinary option and the
igbinary extension is loaded.
Type: integer, default: Memcached::SERIALIZER_PHP.
Memcached::SERIALIZER_PHPThe default PHP serializer.
Memcached::SERIALIZER_IGBINARYThe » igbinary serializer. Instead of textual representation it stores PHP data structures in a compact binary form, resulting in space and time gains.
Memcached::SERIALIZER_JSONThe JSON serializer. Requires PHP 5.2.10+.
Memcached::OPT_PREFIX_KEYThis can be used to create a "domain" for your item keys. The value
specified here will be prefixed to each of the keys. It cannot be
longer than 128 characters and will reduce the
maximum available key size. The prefix is applied only to the item keys,
not to the server keys.
Type: string, default: "".
Memcached::OPT_HASHSpecifies the hashing algorithm used for the item keys. The valid
values are supplied via Memcached::HASH_* constants.
Each hash algorithm has its advantages and its disadvantages. Go with the
default if you don't know or don't care.
Type: integer, default: Memcached::HASH_DEFAULT
Memcached::HASH_DEFAULTThe default (Jenkins one-at-a-time) item key hashing algorithm.
Memcached::HASH_MD5MD5 item key hashing algorithm.
Memcached::HASH_CRCCRC item key hashing algorithm.
Memcached::HASH_FNV1_64FNV1_64 item key hashing algorithm.
Memcached::HASH_FNV1A_64FNV1_64A item key hashing algorithm.
Memcached::HASH_FNV1_32FNV1_32 item key hashing algorithm.
Memcached::HASH_FNV1A_32FNV1_32A item key hashing algorithm.
Memcached::HASH_HSIEHHsieh item key hashing algorithm.
Memcached::HASH_MURMURMurmur item key hashing algorithm.
Memcached::OPT_DISTRIBUTIONSpecifies the method of distributing item keys to the servers. Currently supported methods are modulo and consistent hashing. Consistent hashing delivers better distribution and allows servers to be added to the cluster with minimal cache losses.
Type: integer, default: Memcached::DISTRIBUTION_MODULA.
Memcached::DISTRIBUTION_MODULAModulo-based key distribution algorithm.
Memcached::DISTRIBUTION_CONSISTENTConsistent hashing key distribution algorithm (based on libketama).
Memcached::OPT_LIBKETAMA_COMPATIBLEEnables or disables compatibility with libketama-like behavior. When enabled, the item key hashing algorithm is set to MD5 and distribution is set to be weighted consistent hashing distribution. This is useful because other libketama-based clients (Python, Ruby, etc.) with the same server configuration will be able to access the keys transparently.
Hinweis:
It is highly recommended to enable this option if you want to use consistent hashing, and it may be enabled by default in future releases.
Type: boolean, default: FALSE.
Memcached::OPT_BUFFER_WRITESEnables or disables buffered I/O. Enabling buffered I/O causes storage commands to "buffer" instead of being sent. Any action that retrieves data causes this buffer to be sent to the remote connection. Quitting the connection or closing down the connection will also cause the buffered data to be pushed to the remote connection.
Type: boolean, default: FALSE.
Memcached::OPT_BINARY_PROTOCOLEnable the use of the binary protocol. Please note that you cannot toggle this option on an open connection.
Type: boolean, default: FALSE.
Memcached::OPT_NO_BLOCKEnables or disables asynchronous I/O. This is the fastest transport available for storage functions.
Type: boolean, default: FALSE.
Memcached::OPT_TCP_NODELAYEnables or disables the no-delay feature for connecting sockets (may be faster in some environments).
Type: boolean, default: FALSE.
Memcached::OPT_SOCKET_SEND_SIZEThe maximum socket send buffer in bytes.
Type: integer, default: varies by platform/kernel
configuration.
Memcached::OPT_SOCKET_RECV_SIZEThe maximum socket receive buffer in bytes.
Type: integer, default: varies by platform/kernel
configuration.
Memcached::OPT_CONNECT_TIMEOUTIn non-blocking mode this set the value of the timeout during socket connection, in milliseconds.
Type: integer, default: 1000.
Memcached::OPT_RETRY_TIMEOUTThe amount of time, in seconds, to wait until retrying a failed connection attempt.
Type: integer, default: 0.
Memcached::OPT_SEND_TIMEOUTSocket sending timeout, in microseconds. In cases where you cannot use non-blocking I/O this will allow you to still have timeouts on the sending of data.
Type: integer, default: 0.
Memcached::OPT_RECV_TIMEOUTSocket reading timeout, in microseconds. In cases where you cannot use non-blocking I/O this will allow you to still have timeouts on the reading of data.
Type: integer, default: 0.
Memcached::OPT_POLL_TIMEOUTTimeout for connection polling, in milliseconds.
Type: integer, default: 1000.
Memcached::OPT_CACHE_LOOKUPSEnables or disables caching of DNS lookups.
Type: boolean, default: FALSE.
Memcached::OPT_SERVER_FAILURE_LIMITSpecifies the failure limit for server connection attempts. The server will be removed after this many continuous connection failures.
Type: integer, default: 0.
Memcached::HAVE_IGBINARYIndicates whether igbinary serializer support is available.
Type: boolean.
Memcached::HAVE_JSONIndicates whether JSON serializer support is available.
Type: boolean.
Memcached::HAVE_MSGPACKIndicates whether msgpack serializer support is available.
Type: boolean.
Available as of Memcached 3.0.0.
Memcached::HAVE_SESSIONType: boolean.
Available as of Memcached 3.0.0.
Memcached::HAVE_SASLType: boolean.
Available as of Memcached 3.0.0.
Memcached::GET_EXTENDEDA flag for Memcached::get(), Memcached::getMulti() and Memcached::getMultiByKey() to ensure that the CAS token values are returned as well.
Available as of Memcached 3.0.0.
Memcached::GET_PRESERVE_ORDERA flag for Memcached::getMulti() and Memcached::getMultiByKey() to ensure that the keys are returned in the same order as they were requested in. Non-existing keys get a default value of NULL.
Memcached::RES_SUCCESSThe operation was successful.
Memcached::RES_FAILUREThe operation failed in some fashion.
Memcached::RES_HOST_LOOKUP_FAILUREDNS lookup failed.
Memcached::RES_UNKNOWN_READ_FAILUREFailed to read network data.
Memcached::RES_PROTOCOL_ERRORBad command in memcached protocol.
Memcached::RES_CLIENT_ERRORError on the client side.
Memcached::RES_SERVER_ERRORError on the server side.
Memcached::RES_WRITE_FAILUREFailed to write network data.
Memcached::RES_DATA_EXISTSFailed to do compare-and-swap: item you are trying to store has been modified since you last fetched it.
Memcached::RES_NOTSTOREDItem was not stored: but not because of an error. This normally means that either the condition for an "add" or a "replace" command wasn't met, or that the item is in a delete queue.
Memcached::RES_NOTFOUNDItem with this key was not found (with "get" operation or "cas" operations).
Memcached::RES_PARTIAL_READPartial network data read error.
Memcached::RES_SOME_ERRORSSome errors occurred during multi-get.
Memcached::RES_NO_SERVERSServer list is empty.
Memcached::RES_ENDEnd of result set.
Memcached::RES_ERRNOSystem error.
Memcached::RES_BUFFEREDThe operation was buffered.
Memcached::RES_TIMEOUTThe operation timed out.
Memcached::RES_BAD_KEY_PROVIDEDBad key.
Memcached::RES_CONNECTION_SOCKET_CREATE_FAILUREFailed to create network socket.
Memcached::RES_PAYLOAD_FAILUREPayload failure: could not compress/decompress or serialize/unserialize the value.
Memcached::RES_AUTH_PROBLEMAvailable as of Memcached 3.0.0.
Memcached::RES_AUTH_FAILUREAvailable as of Memcached 3.0.0.
Memcached::RES_AUTH_CONTINUEAvailable as of Memcached 3.0.0.
Memcached::RES_E2BIGAvailable as of Memcached 3.0.0.
Memcached::RES_KEY_TOO_BIGAvailable as of Memcached 3.0.0.
Memcached::RES_SERVER_TEMPORARILY_DISABLEDAvailable as of Memcached 3.0.0.
Memcached::RES_SERVER_MEMORY_ALLOCATION_FAILUREAvailable as of Memcached 3.0.0.