aboutsummaryrefslogtreecommitdiff
path: root/zenutil/cache/cachepolicy.cpp
diff options
context:
space:
mode:
authormattpetersepic <[email protected]>2022-02-08 20:44:35 -0700
committerGitHub <[email protected]>2022-02-08 20:44:35 -0700
commit976ef2f4ea785bfe43a765a3c8604afc61342bb1 (patch)
tree9c72d1b1566e757a30a4092979abd1dbd05a0901 /zenutil/cache/cachepolicy.cpp
parentUse a clean and detatched head instead of pulling a branch along (diff)
downloadzen-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/cache/cachepolicy.cpp')
-rw-r--r--zenutil/cache/cachepolicy.cpp12
1 files changed, 1 insertions, 11 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);
}