aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcache.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-15 14:27:58 +0100
committerMartin Ridgers <[email protected]>2021-11-15 14:27:58 +0100
commit7807a69e018a9df96a739dfdb945c648e029f8fe (patch)
tree85f9cc9099004f7fb0b1c794937562c6f378c4af /zenserver/cache/structuredcache.cpp
parentMerged main (diff)
downloadzen-7807a69e018a9df96a739dfdb945c648e029f8fe.tar.xz
zen-7807a69e018a9df96a739dfdb945c648e029f8fe.zip
GCC does not like CacheKey member being named the same as its type
Diffstat (limited to 'zenserver/cache/structuredcache.cpp')
-rw-r--r--zenserver/cache/structuredcache.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp
index 6fba7648f..ed20e5294 100644
--- a/zenserver/cache/structuredcache.cpp
+++ b/zenserver/cache/structuredcache.cpp
@@ -448,7 +448,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(zen::HttpServerRequest& Request
if (StoreUpstream)
{
ZEN_ASSERT(m_UpstreamCache);
- m_UpstreamCache->EnqueueUpstream({.Type = ZenContentType::kBinary, .CacheKey = {Ref.BucketSegment, Ref.HashKey}});
+ m_UpstreamCache->EnqueueUpstream({.Type = ZenContentType::kBinary, .Key = {Ref.BucketSegment, Ref.HashKey}});
}
Request.WriteResponse(HttpResponseCode::Created);
@@ -492,9 +492,9 @@ HttpStructuredCacheService::HandlePutCacheRecord(zen::HttpServerRequest& Request
if (StoreUpstream && !IsPartialRecord)
{
ZEN_ASSERT(m_UpstreamCache);
- m_UpstreamCache->EnqueueUpstream({.Type = ZenContentType::kCbObject,
- .CacheKey = {Ref.BucketSegment, Ref.HashKey},
- .PayloadIds = std::move(ValidAttachments)});
+ m_UpstreamCache->EnqueueUpstream({.Type = ZenContentType::kCbObject,
+ .Key = {Ref.BucketSegment, Ref.HashKey},
+ .PayloadIds = std::move(ValidAttachments)});
}
Request.WriteResponse(HttpResponseCode::Created);
@@ -575,7 +575,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(zen::HttpServerRequest& Request
{
ZEN_ASSERT(m_UpstreamCache);
m_UpstreamCache->EnqueueUpstream({.Type = ZenContentType::kCbPackage,
- .CacheKey = {Ref.BucketSegment, Ref.HashKey},
+ .Key = {Ref.BucketSegment, Ref.HashKey},
.PayloadIds = std::move(ValidAttachments)});
}
@@ -931,8 +931,8 @@ HttpStructuredCacheService::HandleRpcGetCacheRecords(zen::HttpServerRequest& Req
{
ZEN_DEBUG("Uncompressed payload '{}' from upstream cache record '{}/{}'",
HashView.AsHash(),
- Params.CacheKey.Bucket,
- Params.CacheKey.Hash);
+ Params.Key.Bucket,
+ Params.Key.Hash);
Count.Invalid++;
}
}
@@ -952,8 +952,8 @@ HttpStructuredCacheService::HandleRpcGetCacheRecords(zen::HttpServerRequest& Req
if (CacheValue)
{
ZEN_DEBUG("HIT - '{}/{}' {} '{}' attachments '{}/{}/{}' (new/valid/total) (UPSTREAM)",
- Params.CacheKey.Bucket,
- Params.CacheKey.Hash,
+ Params.Key.Bucket,
+ Params.Key.Hash,
NiceBytes(CacheValue.GetSize()),
ToString(HttpContentType::kCbPackage),
Count.New,
@@ -963,7 +963,7 @@ HttpStructuredCacheService::HandleRpcGetCacheRecords(zen::HttpServerRequest& Req
CacheValue.SetContentType(ZenContentType::kCbObject);
CacheValues[Params.KeyIndex] = CacheValue;
- m_CacheStore.Put(Params.CacheKey.Bucket, Params.CacheKey.Hash, {.Value = CacheValue});
+ m_CacheStore.Put(Params.Key.Bucket, Params.Key.Hash, {.Value = CacheValue});
m_CacheStats.HitCount++;
m_CacheStats.UpstreamHitCount++;
@@ -971,7 +971,7 @@ HttpStructuredCacheService::HandleRpcGetCacheRecords(zen::HttpServerRequest& Req
else
{
const bool IsPartial = Count.Valid != Count.Total;
- ZEN_DEBUG("MISS - '{}/{}' {}", Params.CacheKey.Bucket, Params.CacheKey.Hash, IsPartial ? "(partial)"sv : ""sv);
+ ZEN_DEBUG("MISS - '{}/{}' {}", Params.Key.Bucket, Params.Key.Hash, IsPartial ? "(partial)"sv : ""sv);
m_CacheStats.MissCount++;
}
};