Skip to main content

start_cache_server_with_options

Function start_cache_server_with_options 

Source
pub fn start_cache_server_with_options(
    port: u16,
    max_keys: usize,
    max_history: usize,
    resp_port: Option<u16>,
    resp_only: bool,
) -> Result<(), String>
Expand description

Start a standalone cache server with optional RESP protocol support.

When resp_port is Some(port), a RESP-compatible TCP server is also started on that port, allowing redis-cli and any Redis client library to connect directly.

When resp_only is true, only the RESP server is started (no HTTP).