Skip to main content

linkrs_query/
cache.rs

1//! Query Cache Module
2//!
3//! Provide a unified cache management function, including:
4//! Query plan cache (Prepared Statement)
5//! CTE result caching
6//!
7//! # Module Structure
8//!
9//! - `config`: Configuration for the plan and CTE caches
10//! - `stats`: Statistics collection and reporting
11//! - `plan_cache`: Query plan cache (Prepared Statement style)
12//! - `cte_cache`: CTE result cache
13
14// Submodules
15pub mod config;
16pub mod cte_cache;
17pub mod plan_cache;
18pub mod stats;
19
20// Re-export config types
21pub use config::{CachePriority, CteCacheConfig, PlanCacheConfig};
22
23// Re-export stats types
24pub use stats::{
25    CacheStats, CteCacheStats, CteCacheStatsSnapshot, MemoryStats, PlanCacheStats,
26    PlanCacheStatsSnapshot,
27};
28
29// Re-export the plan cache types
30pub use plan_cache::{
31    CachedPlan, ParamPosition, ParameterizedQueryHandler, PlanCacheContext, PlanCacheKey,
32    QueryPlanCache,
33};
34
35// Re-export the CTE cache types
36pub use cte_cache::{CteCacheDecision, CteCacheDecisionMaker, CteCacheEntry, CteCacheManager};