aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/cache/httpstructuredcache.cpp
diff options
context:
space:
mode:
authorzousar <[email protected]>2025-03-24 23:30:03 -0600
committerzousar <[email protected]>2025-03-24 23:30:03 -0600
commit25985163796ba45b028b40662146e44e8eff47a8 (patch)
tree4430bd2810727fbe19fdfb8c1b653b5abd0af99b /src/zenserver/cache/httpstructuredcache.cpp
parentControl overwrite enforcement with a config setting (diff)
downloadzen-25985163796ba45b028b40662146e44e8eff47a8.tar.xz
zen-25985163796ba45b028b40662146e44e8eff47a8.zip
Establish TODOs and unit test for rejected PUT propagation
Diffstat (limited to 'src/zenserver/cache/httpstructuredcache.cpp')
-rw-r--r--src/zenserver/cache/httpstructuredcache.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp
index d5dd28f68..932e456d2 100644
--- a/src/zenserver/cache/httpstructuredcache.cpp
+++ b/src/zenserver/cache/httpstructuredcache.cpp
@@ -1233,6 +1233,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con
RawHash = IoHash::HashBuffer(SharedBuffer(Body));
}
const bool Overwrite = !EnumHasAllFlags(PolicyFromUrl, CachePolicy::QueryLocal);
+ // TODO: Propagation for rejected PUTs
if (!m_CacheStore.Put(RequestContext,
Ref.Namespace,
Ref.BucketSegment,
@@ -1294,6 +1295,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con
const bool Overwrite = !EnumHasAllFlags(PolicyFromUrl, CachePolicy::QueryLocal);
+ // TODO: Propagation for rejected PUTs
if (!m_CacheStore.Put(RequestContext,
Ref.Namespace,
Ref.BucketSegment,
@@ -1402,6 +1404,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con
ZenCacheValue CacheValue;
CacheValue.Value = CacheRecord.GetBuffer().AsIoBuffer();
CacheValue.Value.SetContentType(ZenContentType::kCbObject);
+ // TODO: Propagation for rejected PUTs
if (!m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, CacheValue, ReferencedAttachments, Overwrite))
{
return Request.WriteResponse(HttpResponseCode::Conflict);