9#ifndef SQUID_SRC_STORE_SWAPMETA_H
10#define SQUID_SRC_STORE_SWAPMETA_H
110static_assert(
SwapMetaFieldValueLengthMax <= uint64_t(std::numeric_limits<RawSwapMetaLength>::max()),
"any swap metadata value size can be stored as RawSwapMetaLength");
160 enum class DeprecatedMetas {
162 STORE_META_KEY_URL = 1,
164 STORE_META_KEY_SHA = 2,
166 STORE_META_HITMETERING = 6,
171 type ==
static_cast<RawSwapMetaType>(DeprecatedMetas::STORE_META_KEY_URL) ||
172 type ==
static_cast<RawSwapMetaType>(DeprecatedMetas::STORE_META_KEY_SHA) ||
173 type ==
static_cast<RawSwapMetaType>(DeprecatedMetas::STORE_META_HITMETERING) ||
174 type ==
static_cast<RawSwapMetaType>(DeprecatedMetas::STORE_META_VALID);
182 enum class ReservedMetas {
184 STORE_META_STOREURL = 11,
186 STORE_META_VARY_ID = 12
189 type ==
static_cast<RawSwapMetaType>(ReservedMetas::STORE_META_STOREURL) ||
190 type ==
static_cast<RawSwapMetaType>(ReservedMetas::STORE_META_VARY_ID);
227 4*
sizeof(time_t) +
sizeof(uint64_t) + 2*
sizeof(uint16_t);
232 4*
sizeof(time_t) +
sizeof(
size_t) + 2*
sizeof(uint16_t);
const RawSwapMetaType RawSwapMetaTypeBottom
const auto SwapMetaPrefixSize
The size of the initial (and required) portion of any swap metadata.
const size_t SwapMetaFieldValueLengthMax
constexpr RawSwapMetaType RawSwapMetaTypeTop()
constexpr bool IgnoredSwapMetaType(const RawSwapMetaType type)
constexpr bool HonoredSwapMetaType(const RawSwapMetaType type)
constexpr bool ReservedSwapMetaType(const RawSwapMetaType type)
constexpr bool DeprecatedSwapMetaType(const RawSwapMetaType type)
@ STORE_META_VARY_HEADERS
Stores Vary request headers.
void CheckSwapMetaSerialization(RawSwapMetaType, RawSwapMetaLength, const void *)
const char SwapMetaMagic
the start of the swap meta section
const auto STORE_HDR_METASIZE_OLD
const auto STORE_HDR_METASIZE
int RawSwapMetaPrefixLength