Expand description
Redis key, hash and set store.
RedisStore wraps a cloneable [redis::aio::ConnectionManager]. It is a
specialised data API: relational plans are executed by the SQLite and
PostgreSQL adapters. RedisStore::capabilities rejects every relational
Feature before any I/O.
Keys are strings. A prefix (for example "cache:") is prepended as-is, so
include the separator in the prefix when one is wanted. Values are UTF-8.
Time-to-live is expressed in milliseconds (PX / PEXPIRE / PTTL); a
duration below one millisecond is rejected before a command is sent.
use siderite_backends::redis::RedisStore;
use siderite_orm::{BackendKind, Feature, OrmError};
let err = RedisStore::require(Feature::Joins).unwrap_err();
assert!(matches!(
OrmError::from(err),
OrmError::Capability(siderite_orm::BackendCapabilityError::Unsupported {
backend: BackendKind::Redis,
feature: Feature::Joins,
})
));Structs§
- Marker
Admission - Arguments of
RedisStore::admit_marker. Keys are logical (the store prefix is applied); values are the strings stored as-is. - Redis
Store - Cloneable Redis client.
Enums§
- Marker
Reply - What
RedisStore::admit_markerdecided. - Redis
Error - Failure from
RedisStore. - Ttl
- Remaining lifetime of a key, from
PTTL.