4#ifndef _Stroika_Foundation_IO_Network_HTTP_CacheControl_h_
5#define _Stroika_Foundation_IO_Network_HTTP_CacheControl_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
76 static constexpr Cacheability ePublic = Cacheability::ePublic;
77 static constexpr Cacheability ePrivate = Cacheability::ePrivate;
78 static constexpr Cacheability eNoStore = Cacheability::eNoStore;
79 static constexpr Cacheability eNoCache = Cacheability::eNoCache;
83 optional<Cacheability> fCacheability;
91 static constexpr uint32_t kMaximumAgeValue = numeric_limits<int32_t>::max ();
134 optional<int> fAmount;
135 nonvirtual strong_ordering operator<=> (
const MaxStale&)
const =
default;
137 optional<MaxStale> fMaxStale;
148 template <
typename T>
159 nonvirtual strong_ordering operator<=> (
const CacheControl&)
const =
default;
164 nonvirtual
bool operator== (
const CacheControl&)
const =
default;
188 [[deprecated (
"Since v2.1.11 - deprecated - probably use CacheControl{.fCacheability=CacheControl::ePrivate, "
195 .fCacheability = CacheControl::ePublic, .fMaxAge = CacheControl::kMaximumAgeValue, .fImmutable =
true};
206#include "CacheControl.inl"
#define Stroika_Define_Enum_Bounds(FIRST_ITEM, LAST_ITEM)
String is like std::u32string, except it is much easier to use, often much more space efficient,...
bool fImmutable
Very useful if/when true.
optional< int > fSharedMaxAge
static const CacheControl kImmutable
bool fMustRevalidate
Probably not useful in most cases. Just affects behavior of cached values when expired and disconnect...
optional< uint32_t > fAge
static const CacheControl kMustRevalidatePrivate
this means you CAN cache the value, but should revalidate each time before use (so etags can be used ...
nonvirtual Characters::String ToString() const
static const CacheControl kDisableCaching
optional< uint32_t > fMaxAge
static CacheControl Parse(const Characters::String &headerValue)
optional< int > fMinFresh