29#ifndef DETERMINISTICESPASYNCWEBSERVER_EDGE_CACHE_SD_H
30#define DETERMINISTICESPASYNCWEBSERVER_EDGE_CACHE_SD_H
34#if DETWS_ENABLE_EDGE_CACHE && DETWS_ENABLE_DBM
47static constexpr size_t EDGE_SD_VALUE_MAX = 1 + 2 + 2 + 7u * 2u
48 +
sizeof(EdgeEntry::key) +
sizeof(EdgeEntry::content_type) +
49 sizeof(EdgeEntry::etag) +
sizeof(EdgeEntry::last_modified) +
50 sizeof(EdgeEntry::content_encoding) +
sizeof(EdgeEntry::vary_names) +
58size_t edge_sd_serialize(
const EdgeEntry *e, uint8_t *out,
size_t cap);
68bool edge_sd_deserialize(
const uint8_t *buf,
size_t len, EdgeEntry *e);
75bool edge_sd_put(DetwsDbm *db,
const EdgeEntry *e, uint8_t *scratch,
size_t scratch_cap);
81bool edge_sd_get(DetwsDbm *db,
const uint8_t digest[32], EdgeEntry *e, uint8_t *scratch,
size_t scratch_cap);
84bool edge_sd_del(DetwsDbm *db,
const uint8_t digest[32]);
90uint32_t edge_sd_purge_prefix(DetwsDbm *db,
const char *path_prefix, uint8_t *scratch,
size_t scratch_cap);
93uint32_t edge_sd_purge_all(DetwsDbm *db);
User-facing configuration for DeterministicESPAsyncWebServer.
#define DETWS_EDGE_BODY_MAX
Log-structured hash key-value store on the WAL (DETWS_ENABLE_DBM, requires DETWS_ENABLE_WAL).
CDN edge-cache tier - pure engine (DETWS_ENABLE_EDGE_CACHE).