pub struct StoredCache {
pub policy: StoredCachePolicy,
pub compression: Option<Vec<CompressionAlgorithm>>,
pub max_ttl: Option<u64>,
pub hit_ttl: Option<u64>,
pub max_size: Option<u64>,
pub max_count: Option<usize>,
pub frequency_window: Option<u64>,
pub clean_interval: Option<(u64, u64)>,
pub sync_interval: Option<(u64, u64)>,
pub evict_on_dependency_change: Option<bool>,
}Expand description
Render caching policy.
IMPORTANT: Very experimental, may not work as described. policy: Permanent is currently
the most likely to behave correctly.
Fields§
§policy: StoredCachePolicy§compression: Option<Vec<CompressionAlgorithm>>Which compression formats should be stored
max_ttl: Option<u64>Upper limit on total time a cached item can be stored
Unit: seconds
hit_ttl: Option<u64>Compared with time since last hit.
Unit: seconds
max_size: Option<u64>Upper limit on the cumulative size of all cached responses for a given template.
Unit: bytes
max_count: Option<usize>Upper limit on the number of cached responses stored at a given time, for a given template.
frequency_window: Option<u64>How long an LFU “hit” tick is valid for
Unit: seconds
clean_interval: Option<(u64, u64)>Rate at which the cache is cleaned based on other rules.
Option<(min, max)>
sync_interval: Option<(u64, u64)>Rate at which the in-memory variables are synced to persistent.
Option<(min, max)>
evict_on_dependency_change: Option<bool>Whether a cached item should also track the of models and content which it depends on, and evict when they are modified.
Trait Implementations§
Source§impl Clone for StoredCache
impl Clone for StoredCache
Source§fn clone(&self) -> StoredCache
fn clone(&self) -> StoredCache
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more