28#ifndef PROTOCORE_HTTPCACHE_H
29#define PROTOCORE_HTTPCACHE_H
33#if PROTOCORE_ENABLE_HTTP_CACHE
48typedef struct protocore_cache_control
52 embed_bool cc_private;
55 embed_bool no_transform;
56 embed_bool must_revalidate;
57 embed_bool proxy_revalidate;
58 embed_bool must_understand;
59 embed_bool cc_immutable;
61 embed_bool only_if_cached;
65 int32_t stale_while_revalidate;
66 int32_t stale_if_error;
69} protocore_cache_control;
74 protocore_cache_control *cc;
75} HttpcacheControlInitArgs;
82 const protocore_cache_control *cc;
83} HttpcacheControlBuildArgs;
90 protocore_cache_control *cc;
91} HttpcacheControlParseArgs;
96 protocore_cache_control *cc;
98} HttpcacheImmutableAssetArgs;
103 protocore_cache_control *cc;
105 int32_t stale_while_revalidate;
106} HttpcacheRevalidatableArgs;
111 protocore_cache_control *cc;
112} HttpcacheNoStoreArgs;
117 protocore_cache_control *cc;
120} HttpcacheSharedArgs;
125 const protocore_cache_control *cc;
127 long expires_minus_date;
128} HttpcacheFreshnessLifetimeArgs;
165 HttpcacheControlInitArgs control_init_args;
166 HttpcacheControlBuildArgs control_build_args;
167 HttpcacheControlParseArgs control_parse_args;
168 HttpcacheImmutableAssetArgs immutable_asset_args;
169 HttpcacheRevalidatableArgs revalidatable_args;
170 HttpcacheNoStoreArgs no_store_args;
171 HttpcacheSharedArgs shared_args;
172 HttpcacheFreshnessLifetimeArgs freshness_lifetime_args;
179extern HttpcacheVars HttpcacheV;
184 void (*
const control_init)(
const uint8_t *work);
185 void (*
const control_build)(
const uint8_t *work);
186 void (*
const control_parse)(
const uint8_t *work);
187 void (*
const immutable_asset)(
const uint8_t *work);
188 void (*
const revalidatable)(
const uint8_t *work);
189 void (*
const no_store)(
const uint8_t *work);
190 void (*
const shared)(
const uint8_t *work);
191 void (*
const freshness_lifetime)(
const uint8_t *work);
196void protocore_httpcache_control_init(
const uint8_t *work);
197void protocore_httpcache_control_build(
const uint8_t *work);
198void protocore_httpcache_control_parse(
const uint8_t *work);
199void protocore_httpcache_immutable_asset(
const uint8_t *work);
200void protocore_httpcache_revalidatable(
const uint8_t *work);
201void protocore_httpcache_no_store(
const uint8_t *work);
202void protocore_httpcache_shared(
const uint8_t *work);
203void protocore_httpcache_freshness_lifetime(
const uint8_t *work);
209static const HttpcacheNs Httpcache __attribute__((unused)) = {
210 .control_init = protocore_httpcache_control_init,
211 .control_build = protocore_httpcache_control_build,
212 .control_parse = protocore_httpcache_control_parse,
213 .immutable_asset = protocore_httpcache_immutable_asset,
214 .revalidatable = protocore_httpcache_revalidatable,
215 .no_store = protocore_httpcache_no_store,
216 .shared = protocore_httpcache_shared,
217 .freshness_lifetime = protocore_httpcache_freshness_lifetime,