Cache refactor - add an in-memory cache, so redis is not needed

This commit is contained in:
Zsombor Gegesy 2023-09-09 18:17:29 +02:00
parent d1d2d4e44d
commit 996ff84c5b
10 changed files with 263 additions and 146 deletions

View file

@ -19,7 +19,7 @@ pub struct Config {
pub style: Style,
/// It stores the redis connection url address on which the redis
/// client should connect.
pub redis_url: String,
pub redis_url: Option<String>,
/// It stores the option to whether enable or disable production use.
pub aggregator: AggregatorConfig,
/// It stores the option to whether enable or disable logs.
@ -99,7 +99,7 @@ impl Config {
globals.get::<_, String>("theme")?,
globals.get::<_, String>("colorscheme")?,
),
redis_url: globals.get::<_, String>("redis_url")?,
redis_url: globals.get::<_, String>("redis_url").ok(),
aggregator: AggregatorConfig {
random_delay: globals.get::<_, bool>("production_use")?,
},