Expand description
This module implements the high-level client used to communicate with a memcached cluster. Regardless of the async runtime used, all implementations use the same client interface with the same API.
Structs§
- Client
- A client manages connections to every node in a memcached cluster using consistent hashing to decide which connection to use based on the key.
- Client
Config - Set configuration values for a memcached client.
- NoCompressor
- An implementation of
Compressor
that does nothing. This is useful if you want to disable compression.
Enums§
- Error
- An error causing during client communication with Memcached.
Traits§
- Compressor
- A Compressor is used to implement compression of packet values. A default
implementation is provided for
NoCompressor
, as well as [ZlibCompressor
]. - Connection
- A connection is an async interface to memcached, which requires a concrete implementation using an underlying async runtime (e.g. tokio or async-std.)
Type Aliases§
- Bulk
ErrResponse - The result of a multi_*() request. A map of all keys for which there was an error for specific keys. These can be treated as get misses and ignored, but it may be desirable to log these errors to uncover underlying issues.
- Bulk
GetResponse - The result of doing a multi_get(). The Ok result will be a tuple of ok, err responses. The err responses can be treated as get misses, but should be logged somewhere for visibility. Lots of them could indicate a serious underlying issue.
- Bulk
OkResponse - The result of of a multi_get() request. A map of all of keys for which memcached returned a found response, and their corresponding values.
- Bulk
Update Response - The result of doing a multi_set(), multi_delete(), etc…
- Pool
- A connection pool for multiple connections. Using a pool is recommended for best performance since it eliminates the overhead of having to constantly recreate TCP connections, while also balancing the total number of connections open at a time.