configure_cache

Function configure_cache 

Source
pub fn configure_cache(config: CacheStorageConfig) -> bool
Expand description

Configure the global cache storage settings.

This must be called before the first cache access to take effect. If called after cache initialization, returns false and logs a warning.

§Example

use sentinel_config::CacheStorageConfig;
use sentinel_proxy::cache::configure_cache;

let config = CacheStorageConfig {
    max_size_bytes: 200 * 1024 * 1024, // 200MB
    lock_timeout_secs: 15,
    ..Default::default()
};
configure_cache(config);