1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! Cacheable request types and traits.
//!
//! This module provides types for determining whether requests should be
//! cached and extracting cache keys from them:
//!
//! - [`CacheableRequest`] - Trait for request types that can participate in caching
//! - [`CacheablePolicyData`] - Request bundled with its cache key
//! - [`RequestCachePolicy`] - Type alias for request cache decisions
//!
//! ## Request Processing Flow
//!
//! When a request is processed:
//!
//! 1. **Predicates** evaluate whether the request should be cached
//! 2. **Extractors** generate the cache key from request components
//! 3. The result is either `Cacheable` (with key) or `NonCacheable`
use Future;
use crate::;
/// A cacheable request bundled with its generated cache key.
///
/// Created when a request passes predicate evaluation and has its
/// cache key extracted. Contains both the original request and the
/// key used for cache lookup/storage.
/// Cache policy for requests.
///
/// Type alias that specializes [`CachePolicy`] for request caching:
/// - `Cacheable` variant contains [`CacheablePolicyData`] with the request and its key
/// - `NonCacheable` variant contains the original request
pub type RequestCachePolicy<T> = ;
/// Trait for request types that can participate in caching.
///
/// Implementations determine whether a request should be cached by
/// applying predicates and extracting cache keys.
///
/// # Type Requirements
///
/// Request types must be `Sized` to allow ownership transfer through
/// the caching pipeline.
///
/// # Processing
///
/// The `cache_policy` method:
/// 1. Applies predicates to determine if the request is cacheable
/// 2. If cacheable, extracts a cache key using the provided extractors
/// 3. Returns either `Cacheable` with the key or `NonCacheable`