// Copyright (C) 2026 Ordinary Labs, LLC.
//
// SPDX-License-Identifier: AGPL-3.0-only

use serde::{Deserialize, Serialize};

#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[cfg_attr(feature = "docs", derive(schemars::JsonSchema))]
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct CacheLimits {
    pub max_size_range: (u64, u64),
    pub max_count_range: (usize, usize),

    pub clean_interval_ranges: ((u64, u64), (u64, u64)),
}

impl Default for CacheLimits {
    fn default() -> Self {
        Self {
            max_size_range: (1_000_000, 10_000_000),
            max_count_range: (100, 500),

            clean_interval_ranges: ((5, 10), (15, 20)),
        }
    }
}
