28#ifndef DETERMINISTICESPASYNCWEBSERVER_HTTPCACHE_H
29#define DETERMINISTICESPASYNCWEBSERVER_HTTPCACHE_H
33#if DWS_ENABLE_HTTP_CACHE
45struct DetwsCacheControl
54 bool proxy_revalidate;
62 int32_t stale_while_revalidate;
63 int32_t stale_if_error;
69void cache_control_init(DetwsCacheControl *cc);
79size_t cache_control_build(
char *buf,
size_t cap,
const DetwsCacheControl *cc);
89bool cache_control_parse(
const char *s,
size_t len, DetwsCacheControl *cc);
94void cache_immutable_asset(DetwsCacheControl *cc, uint32_t max_age);
100void cache_revalidatable(DetwsCacheControl *cc, uint32_t max_age, int32_t stale_while_revalidate);
103void cache_no_store(DetwsCacheControl *cc);
106void cache_shared(DetwsCacheControl *cc, uint32_t max_age, uint32_t s_maxage);
116long cache_freshness_lifetime(
const DetwsCacheControl *cc,
bool shared,
long expires_minus_date);
User-facing configuration for DeterministicESPAsyncWebServer.