aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcache.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-19 11:37:25 +0200
committerDan Engelbrecht <[email protected]>2022-05-19 11:37:25 +0200
commita9130d34b5318b0da5d3547c432a8734213fbe9b (patch)
tree2cdb96f85e221cc24227b410d4d5f8f4e4af7a41 /zenserver/cache/structuredcache.h
parentMerge pull request #98 from EpicGames/de/fix-bucket-name-rules (diff)
downloadzen-a9130d34b5318b0da5d3547c432a8734213fbe9b.tar.xz
zen-a9130d34b5318b0da5d3547c432a8734213fbe9b.zip
Keep Namespace out of CacheKey and store it on request level
RPC requests now has a Namespace field under Params instead of one Namespace per cache key Fall back to legacy upstream HTTP URI format if default namespace is requested
Diffstat (limited to 'zenserver/cache/structuredcache.h')
-rw-r--r--zenserver/cache/structuredcache.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h
index 5f248edd1..890a2ebab 100644
--- a/zenserver/cache/structuredcache.h
+++ b/zenserver/cache/structuredcache.h
@@ -118,7 +118,8 @@ private:
PutResult PutCacheRecord(PutRequestData& Request, const CbPackage* Package);
/** HandleRpcGetCacheChunks Helper: Parse the Body object into RecordValue Requests and Value Requests. */
- bool ParseGetCacheChunksRequest(std::vector<CacheKeyRequest>& RecordKeys,
+ bool ParseGetCacheChunksRequest(std::string& Namespace,
+ std::vector<CacheKeyRequest>& RecordKeys,
std::vector<cache::detail::RecordBody>& Records,
std::vector<CacheChunkRequest>& RequestKeys,
std::vector<cache::detail::ChunkRequest>& Requests,
@@ -126,18 +127,24 @@ private:
std::vector<cache::detail::ChunkRequest*>& ValueRequests,
CbObjectView RpcRequest);
/** HandleRpcGetCacheChunks Helper: Load records to get ContentId for RecordRequests, and load their payloads if they exist locally. */
- void GetLocalCacheRecords(std::vector<CacheKeyRequest>& RecordKeys,
+ void GetLocalCacheRecords(std::string_view Namespace,
+ std::vector<CacheKeyRequest>& RecordKeys,
std::vector<cache::detail::RecordBody>& Records,
std::vector<cache::detail::ChunkRequest*>& RecordRequests,
std::vector<CacheChunkRequest*>& OutUpstreamChunks);
/** HandleRpcGetCacheChunks Helper: For ValueRequests, load their payloads if they exist locally. */
- void GetLocalCacheValues(std::vector<cache::detail::ChunkRequest*>& ValueRequests, std::vector<CacheChunkRequest*>& OutUpstreamChunks);
+ void GetLocalCacheValues(std::string_view Namespace,
+ std::vector<cache::detail::ChunkRequest*>& ValueRequests,
+ std::vector<CacheChunkRequest*>& OutUpstreamChunks);
/** HandleRpcGetCacheChunks Helper: Load payloads from upstream that did not exist locally. */
- void GetUpstreamCacheChunks(std::vector<CacheChunkRequest*>& UpstreamChunks,
+ void GetUpstreamCacheChunks(std::string_view Namespace,
+ std::vector<CacheChunkRequest*>& UpstreamChunks,
std::vector<CacheChunkRequest>& RequestKeys,
std::vector<cache::detail::ChunkRequest>& Requests);
/** HandleRpcGetCacheChunks Helper: Send response message containing all chunk results. */
- void WriteGetCacheChunksResponse(std::vector<cache::detail::ChunkRequest>& Requests, zen::HttpServerRequest& HttpRequest);
+ void WriteGetCacheChunksResponse(std::string_view Namespace,
+ std::vector<cache::detail::ChunkRequest>& Requests,
+ zen::HttpServerRequest& HttpRequest);
spdlog::logger& Log() { return m_Log; }
spdlog::logger& m_Log;