diff options
| author | Dan Engelbrecht <[email protected]> | 2022-09-13 12:42:40 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-09-15 12:36:45 +0200 |
| commit | b2f3b832437590b5c9eedf0423150df3f199f4b7 (patch) | |
| tree | e1b09dcec8ef2541d13d1f3e5f1084e25ddc6cd9 /zenserver/cache/structuredcache.h | |
| parent | GetCacheChunksRequest with separate policy and OptionalValueFilter (diff) | |
| download | zen-de/get-cache-chunks-api-with-separate-policy.tar.xz zen-de/get-cache-chunks-api-with-separate-policy.zip | |
Diffstat (limited to 'zenserver/cache/structuredcache.h')
| -rw-r--r-- | zenserver/cache/structuredcache.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h index 228b0f69f..0b8e8ee93 100644 --- a/zenserver/cache/structuredcache.h +++ b/zenserver/cache/structuredcache.h @@ -4,6 +4,7 @@ #include <zencore/stats.h> #include <zenhttp/httpserver.h> +#include <zenutil/cache/cacherequests.h> #include "monitoring/httpstats.h" #include "monitoring/httpstatus.h" @@ -109,6 +110,7 @@ private: void HandleRpcGetCacheRecords(zen::HttpServerRequest& Request, CbObjectView BatchRequest); void HandleRpcPutCacheValues(zen::HttpServerRequest& Request, const CbPackage& BatchRequest); void HandleRpcGetCacheValues(zen::HttpServerRequest& Request, CbObjectView BatchRequest); + void HandleRpcGetCacheChunksNew(zen::HttpServerRequest& Request, CbObjectView BatchRequest); void HandleRpcGetCacheChunks(zen::HttpServerRequest& Request, CbObjectView BatchRequest); void HandleCacheNamespaceRequest(zen::HttpServerRequest& Request, std::string_view Namespace); void HandleCacheBucketRequest(zen::HttpServerRequest& Request, std::string_view Namespace, std::string_view Bucket); @@ -161,12 +163,6 @@ private: class ZenCacheStoreBase; class CidStoreBase; -namespace cacherequests { - struct GetCacheRecordsRequest; - struct RecordsRequestPolicy; - struct GetCacheRecordsResult; -} // namespace cacherequests - namespace impl { HttpResponseCode GetCacheRecords(ZenCacheStoreBase& CacheStore, CidStoreBase& CidStore, @@ -177,7 +173,17 @@ namespace impl { const cacherequests::GetCacheRecordsRequest& Request, const cacherequests::RecordsRequestPolicy& Policy, cacherequests::GetCacheRecordsResult& OutResult); -} + + HttpResponseCode GetCacheChunks(ZenCacheStoreBase& CacheStore, + CidStoreBase& CidStore, + UpstreamCache& UpstreamCache, + std::atomic_uint64_t& HitCount, + std::atomic_uint64_t& UpstreamHitCount, + std::atomic_uint64_t& MissCount, + cacherequests::GetCacheChunksRequest& Request, + const cacherequests::ChunksRequestPolicy& Policy, + cacherequests::GetCacheChunksResult& OutResult); +} // namespace impl /** Recognize both kBinary and kCompressedBinary as kCompressedBinary for structured cache value keys. * We need this until the content type is preserved for kCompressedBinary when passing to and from upstream servers. */ |