aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/cache/structuredcache.h')
-rw-r--r--zenserver/cache/structuredcache.h20
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. */