Skip to main content

Module cache_client

Module cache_client 

Source
Expand description

Remote cache client.

Connects to a standalone pylon cache server over HTTP. Provides the same logical API as CachePlugin so callers can swap between embedded and remote cache without changing application logic.

§Example

use pylon_plugin::builtin::cache_client::RemoteCacheClient;

let client = RemoteCacheClient::new("http://localhost:6380");
client.set("greeting", "hello", None).unwrap();
assert_eq!(client.get("greeting").unwrap(), Some("hello".to_string()));

Structs§

RemoteCacheClient
A client that connects to a remote pylon cache server.