Expand description
Redis-backed cache database for the system.
§Architecture
Uses two Redis connections with distinct roles:
- READ (
self.con): synchronous queries (keys,read,load_all), owned by the main struct. - WRITE: owned by a background task on
get_runtime(), receives commands via an unboundedtokio::sync::mpscchannel.
All write operations (insert, update, delete, flush) are routed
through the command channel so they execute on the WRITE connection. This
avoids cross-runtime I/O issues since the WRITE connection is always
created on the Nautilus runtime.
Synchronous callers (close, flushdb_sync) use std::sync::mpsc reply
channels to block until the background task confirms completion. When
called from the Nautilus runtime itself, block_in_place is used
automatically to avoid stalling the worker thread.
Structs§
- Database
Command - Represents a database command to be performed which may be executed in a task.
- Redis
Cache Database - Redis
Cache Database Adapter
Enums§
- Database
Operation - A type of database operation.