diff options
| author | mattpetersepic <[email protected]> | 2022-02-08 20:44:35 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-08 20:44:35 -0700 |
| commit | 976ef2f4ea785bfe43a765a3c8604afc61342bb1 (patch) | |
| tree | 9c72d1b1566e757a30a4092979abd1dbd05a0901 /zenutil | |
| parent | Use a clean and detatched head instead of pulling a branch along (diff) | |
| download | zen-976ef2f4ea785bfe43a765a3c8604afc61342bb1.tar.xz zen-976ef2f4ea785bfe43a765a3c8604afc61342bb1.zip | |
Remove the backwards compatibility for the Zen CachePolicy changes no… (#49)
Remove the backwards compatibility for the Zen CachePolicy changes now that there has been enough time for all internal users of the old protocol to update.
Diffstat (limited to 'zenutil')
| -rw-r--r-- | zenutil/cache/cachepolicy.cpp | 12 | ||||
| -rw-r--r-- | zenutil/include/zenutil/cache/cachepolicy.h | 7 |
2 files changed, 1 insertions, 18 deletions
diff --git a/zenutil/cache/cachepolicy.cpp b/zenutil/cache/cachepolicy.cpp index 8c10ea674..3bca363bb 100644 --- a/zenutil/cache/cachepolicy.cpp +++ b/zenutil/cache/cachepolicy.cpp @@ -122,7 +122,7 @@ ConvertToUpstream(CachePolicy Policy) // Use the downstream value for all other flags. CachePolicy UpstreamPolicy = CachePolicy::None; - + if (EnumHasAllFlags(Policy, CachePolicy::QueryRemote)) { UpstreamPolicy |= CachePolicy::QueryLocal; @@ -206,12 +206,6 @@ OptionalCacheRecordPolicy CacheRecordPolicy::Load(const CbObjectView Object) { std::string_view BasePolicyText = Object["BasePolicy"sv].AsString(); -#if BACKWARDS_COMPATABILITY_JAN2022 - if (BasePolicyText.empty()) - { - BasePolicyText = Object["DefaultValuePolicy"sv].AsString(); - } -#endif if (BasePolicyText.empty()) { return {}; @@ -228,14 +222,10 @@ CacheRecordPolicy::Load(const CbObjectView Object) return {}; } CachePolicy Policy = ParseCachePolicy(PolicyText); -#if BACKWARDS_COMPATABILITY_JAN2022 - Policy = Policy & CacheValuePolicy::PolicyMask; -#else if (EnumHasAnyFlags(Policy, ~CacheValuePolicy::PolicyMask)) { return {}; } -#endif Builder.AddValuePolicy(Id, Policy); } diff --git a/zenutil/include/zenutil/cache/cachepolicy.h b/zenutil/include/zenutil/cache/cachepolicy.h index efcc4fb49..b249982fc 100644 --- a/zenutil/include/zenutil/cache/cachepolicy.h +++ b/zenutil/include/zenutil/cache/cachepolicy.h @@ -11,13 +11,6 @@ #include <gsl/gsl-lite.hpp> #include <span> -#define BACKWARDS_COMPATABILITY_JAN2022 1 -#if BACKWARDS_COMPATABILITY_JAN2022 -# define BACKWARDS_COMPATABILITY_JAN2022_CODE(...) __VA_ARGS__ -#else -# define BACKWARDS_COMPATABILITY_JAN2022_CODE(...) -#endif - namespace zen::Private { class ICacheRecordPolicyShared; } |