SwapMetaIn.cc
Go to the documentation of this file.
119 // XXX: ensure all Squid URL inputs are properly normalized then use case-sensitive compare here
211Store::SwapMetaUnpacker::SwapMetaUnpacker(const char * const buf, const ssize_t size, size_t &swap_hdr_sz)
280 static_assert(offsetof(old_metahdr, flags) + sizeof(old_metahdr::flags) == STORE_HDR_METASIZE_OLD, "we reproduced old swap meta basics format");
constexpr bool Less(const A a, const B b)
whether integer a is less than integer b, with correct overflow handling
Definition: SquidMath.h:48
Definition: MemBuf.h:24
SBuf & trim(const SBuf &toRemove, bool atBeginning=true, bool atEnd=true)
Definition: SBuf.cc:551
Definition: Store.h:42
iterates serialized swap meta fields loaded into a given buffer
Definition: SwapMetaIn.cc:27
bool operator==(const SwapMetaIterator &them) const
Definition: SwapMetaIn.cc:42
SwapMetaIterator(const void *start, const void *end)
positions iterator at the start of a swap meta field extending up to end
Definition: SwapMetaIn.cc:176
std::forward_iterator_tag iterator_category
Definition: SwapMetaIn.cc:30
bool operator!=(const SwapMetaIterator &them) const
Definition: SwapMetaIn.cc:43
Store entry metadata view providing a for-range loop meta field iterator API.
Definition: SwapMetaIn.cc:55
SwapMetaUnpacker(const char *buf, ssize_t bufferLength, size_t &swap_hdr_sz)
Definition: SwapMetaIn.cc:211
a swap metadata field inside the buffer given to SwapMetaUnpacker
Definition: SwapMetaView.h:21
void checkExpectedLength(size_t) const
ensures that our fixed-size field value has the given expected length
Definition: SwapMetaView.cc:83
Definition: SquidConfig.h:62
const auto SwapMetaPrefixSize
The size of the initial (and required) portion of any swap metadata.
Definition: SwapMeta.h:122
void SwapMetaExtract(Item &item, const char *&input, const void *end)
Definition: SwapMetaView.h:68
static void UnpackSwapMetaKey(const SwapMetaView &meta, cache_key *key)
deserializes STORE_META_KEY_MD5 swap meta field
Definition: SwapMetaIn.cc:95
void UnpackHitSwapMeta(char const *, ssize_t, StoreEntry &)
deserializes entry metadata from the given buffer into the cache hit entry
Definition: SwapMetaIn.cc:310
size_t UnpackIndexSwapMeta(const MemBuf &, StoreEntry &, cache_key *)
Definition: SwapMetaIn.cc:243
static void CheckSwapMetaKey(const SwapMetaView &meta, const StoreEntry &entry)
validates serialized STORE_META_KEY_MD5 swap meta field
Definition: SwapMetaIn.cc:73
static SBuf UnpackNewSwapMetaVaryHeaders(const SwapMetaView &meta, const StoreEntry &entry)
deserializes STORE_META_VARY_HEADERS swap meta field
Definition: SwapMetaIn.cc:130
static size_t UnpackPrefix(const char *const buf, const size_t size)
Definition: SwapMetaIn.cc:151
static void CheckSwapMetaUrl(const SwapMetaView &meta, const StoreEntry &entry)
validates serialized STORE_META_URL swap meta field
Definition: SwapMetaIn.cc:105
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63