diff options
| author | Dan Engelbrecht <[email protected]> | 2024-05-02 10:53:15 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-05-02 10:53:15 +0200 |
| commit | 1bafcb32cb48b2256a9d72995388b7df72058039 (patch) | |
| tree | 2385ec3de36c4f45018832eb36bcab6ac2d3670f /src/zenserver/cache/httpstructuredcache.cpp | |
| parent | fix get project files loop (#68) (diff) | |
| download | zen-1bafcb32cb48b2256a9d72995388b7df72058039.tar.xz zen-1bafcb32cb48b2256a9d72995388b7df72058039.zip | |
batch cache put (#67)
- Improvement: Batch scope for put of cache values
Diffstat (limited to 'src/zenserver/cache/httpstructuredcache.cpp')
| -rw-r--r-- | src/zenserver/cache/httpstructuredcache.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp index 8106e9db9..135eee57c 100644 --- a/src/zenserver/cache/httpstructuredcache.cpp +++ b/src/zenserver/cache/httpstructuredcache.cpp @@ -839,7 +839,7 @@ HttpStructuredCacheService::HandleGetCacheRecord(HttpServerRequest& Request, con if (Success && StoreLocal) { - m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, ClientResultValue, {}); + m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, ClientResultValue, {}, nullptr); m_CacheStats.WriteCount++; } } @@ -925,8 +925,13 @@ HttpStructuredCacheService::HandleGetCacheRecord(HttpServerRequest& Request, con if (StoreLocal) { - m_CacheStore - .Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, CacheValue, ReferencedAttachments); + m_CacheStore.Put(RequestContext, + Ref.Namespace, + Ref.BucketSegment, + Ref.HashKey, + CacheValue, + ReferencedAttachments, + nullptr); m_CacheStats.WriteCount++; if (!WriteAttachmentBuffers.empty()) @@ -1067,7 +1072,8 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con Ref.BucketSegment, Ref.HashKey, {.Value = Body, .RawSize = RawSize, .RawHash = RawHash}, - {}); + {}, + nullptr); m_CacheStats.WriteCount++; if (HasUpstream && EnumHasAllFlags(PolicyFromUrl, CachePolicy::StoreRemote)) @@ -1116,7 +1122,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con TotalCount++; }); - m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, {.Value = Body}, ReferencedAttachments); + m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, {.Value = Body}, ReferencedAttachments, nullptr); m_CacheStats.WriteCount++; ZEN_DEBUG("PUTCACHERECORD - '{}/{}/{}' {} '{}' attachments '{}/{}' (valid/total) in {}", |