|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
HTTP Cache-Control directive builder + parser + freshness helper (RFC 9111), DETWS_ENABLE_HTTP_CACHE.
More...
#include "ServerConfig.h"Go to the source code of this file.
HTTP Cache-Control directive builder + parser + freshness helper (RFC 9111), DETWS_ENABLE_HTTP_CACHE.
The origin-side of edge caching: first-class helpers to emit correct, edge-cacheable Cache-Control responses from app routes (so a device sitting behind a real CDN - or the library's own future cache tier - is cached correctly), a tolerant parser to read the directives on a request or an upstream response, and the RFC 9111 sec 4.2.1 freshness-lifetime calculation. Pure text - build the value with ::cache_control_build and hand it to DetWebServer::set_cache_control(); no heap, no stdlib, host-testable.
Directives: RFC 9111 (max-age, s-maxage, no-cache, no-store, no-transform, must-revalidate, proxy-revalidate, must-understand, private, public) plus the widely-used extensions immutable (RFC 8246) and stale-while-revalidate / stale-if-error (RFC 5861), and the request directives a server may want to read (only-if-cached, max-stale, min-fresh).
This is the standards-mechanics layer only. The caching proxy/tier itself (RAM/SD storage, cache key, invalidation, mesh replication) is a separate, larger piece still being scoped.
Definition in file httpcache.h.