aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/upstreamcache.h
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-01-28 13:07:36 +0100
committerPer Larsson <[email protected]>2022-01-28 13:07:36 +0100
commitbd43839e042425d72b584b33c7dbb86dabc95e12 (patch)
tree1e663395ac626f3863ef92e95952b3c4245abf76 /zenserver/upstream/upstreamcache.h
parentGet access token from auth mgr. (diff)
parentCompile fix (diff)
downloadzen-bd43839e042425d72b584b33c7dbb86dabc95e12.tar.xz
zen-bd43839e042425d72b584b33c7dbb86dabc95e12.zip
Merged main.
Diffstat (limited to 'zenserver/upstream/upstreamcache.h')
-rw-r--r--zenserver/upstream/upstreamcache.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/zenserver/upstream/upstreamcache.h b/zenserver/upstream/upstreamcache.h
index 805786cdf..5bc9f58d7 100644
--- a/zenserver/upstream/upstreamcache.h
+++ b/zenserver/upstream/upstreamcache.h
@@ -28,7 +28,7 @@ struct UpstreamCacheRecord
{
ZenContentType Type = ZenContentType::kBinary;
CacheKey Key;
- std::vector<IoHash> PayloadIds;
+ std::vector<IoHash> ValueContentIds;
};
struct UpstreamCacheOptions
@@ -74,14 +74,14 @@ struct CacheRecordGetCompleteParams
using OnCacheRecordGetComplete = std::function<void(CacheRecordGetCompleteParams&&)>;
-struct CachePayloadGetCompleteParams
+struct CacheValueGetCompleteParams
{
const CacheChunkRequest& Request;
size_t RequestIndex{~size_t(0)};
- IoBuffer Payload;
+ IoBuffer Value;
};
-using OnCachePayloadGetComplete = std::function<void(CachePayloadGetCompleteParams&&)>;
+using OnCacheValueGetComplete = std::function<void(CacheValueGetCompleteParams&&)>;
struct UpstreamEndpointStats
{
@@ -157,11 +157,11 @@ public:
const CacheRecordPolicy& Policy,
OnCacheRecordGetComplete&& OnComplete) = 0;
- virtual GetUpstreamCacheResult GetCachePayload(const CacheKey& CacheKey, const IoHash& PayloadId) = 0;
+ virtual GetUpstreamCacheResult GetCacheValue(const CacheKey& CacheKey, const IoHash& PayloadId) = 0;
- virtual GetUpstreamCacheResult GetCachePayloads(std::span<CacheChunkRequest> CacheChunkRequests,
- std::span<size_t> RequestIndex,
- OnCachePayloadGetComplete&& OnComplete) = 0;
+ virtual GetUpstreamCacheResult GetCacheValues(std::span<CacheChunkRequest> CacheChunkRequests,
+ std::span<size_t> RequestIndex,
+ OnCacheValueGetComplete&& OnComplete) = 0;
virtual PutUpstreamCacheResult PutCacheRecord(const UpstreamCacheRecord& CacheRecord,
IoBuffer RecordValue,
@@ -191,11 +191,11 @@ public:
const CacheRecordPolicy& RecordPolicy,
OnCacheRecordGetComplete&& OnComplete) = 0;
- virtual GetUpstreamCacheResult GetCachePayload(const CacheKey& CacheKey, const IoHash& PayloadId) = 0;
+ virtual GetUpstreamCacheResult GetCacheValue(const CacheKey& CacheKey, const IoHash& ValueContentId) = 0;
- virtual void GetCachePayloads(std::span<CacheChunkRequest> CacheChunkRequests,
- std::span<size_t> RequestIndex,
- OnCachePayloadGetComplete&& OnComplete) = 0;
+ virtual void GetCacheValues(std::span<CacheChunkRequest> CacheChunkRequests,
+ std::span<size_t> RequestIndex,
+ OnCacheValueGetComplete&& OnComplete) = 0;
virtual void EnqueueUpstream(UpstreamCacheRecord CacheRecord) = 0;