gproxy_protocol/protocol/claude/common/
cache.rs1use std::collections::BTreeMap;
2
3use serde::{Deserialize, Serialize};
4
5use super::{CacheTtl, JsonObject};
6
7#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8pub struct CacheControl {
9 #[serde(rename = "type")]
10 pub type_: CacheControlType,
11 #[serde(skip_serializing_if = "Option::is_none")]
12 pub ttl: Option<CacheTtl>,
13 #[serde(default, flatten, skip_serializing_if = "BTreeMap::is_empty")]
14 pub extra: JsonObject,
15}
16
17#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
18pub enum CacheControlType {
19 #[serde(rename = "ephemeral")]
20 Ephemeral,
21}