Skip to main content

shared/infrastructure/cache/memcache/
repository.rs

1use crate::error::CoreError;
2
3pub struct MemCache {}
4impl MemCache {
5    pub async fn start(conn: &str) -> Result<memcache::Client, CoreError> {
6        let db = memcache::connect(conn).inspect_err(|e| {
7            tracing::error!(
8                error_code = "InternalError::Database",
9                "Failed to connect to database - {e}"
10            );
11        })?;
12
13        Ok(db)
14    }
15}