Skip to main content

memcached

7 configuration options · available in Rust, Java, Python, Node.js, Go

Quick start
use opendal::Operator;

let operator = Operator::via_iter("memcached", [
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let operator = Operator::via_iter("memcached", [
// network address of the memcached service.
//
// For example: "tcp://localhost:11211"
// ("endpoint".to_string(), "...".to_string()),

// Enable TLS for TCP connections. Defaults to false.
//
// The server certificate must match the endpoint host and a native trust root.
// ("enable_tls".to_string(), "true".to_string()),

// the working directory of the service. Can be "/path/to/dir"
//
// default is "/"
// ("root".to_string(), "...".to_string()),

// Memcached username, optional.
// ("username".to_string(), "...".to_string()),

// Memcached password, optional.
// ("password".to_string(), "...".to_string()),

// The default ttl for put operations.
// ("default_ttl".to_string(), "10s".to_string()),

// The maximum number of connections allowed.
//
// default is 10
// ("connection_pool_max_size".to_string(), "1000".to_string()),
])?;

Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.

Configuration reference

General7
KeyTypeRequiredDescription
endpointstringnonetwork address of the memcached service. For example: "tcp://localhost:11211"
enable_tlsboolnoEnable TLS for TCP connections. Defaults to false. The server certificate must match the endpoint host and a native trust root.
rootstringnothe working directory of the service. Can be "/path/to/dir" default is "/"
usernamestringnoMemcached username, optional.
passwordstringnoMemcached password, optional.
default_ttldurationnoThe default ttl for put operations.
connection_pool_max_sizeintegernoThe maximum number of connections allowed. default is 10