diff options
| author | Per Larsson <[email protected]> | 2022-01-28 13:07:36 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2022-01-28 13:07:36 +0100 |
| commit | bd43839e042425d72b584b33c7dbb86dabc95e12 (patch) | |
| tree | 1e663395ac626f3863ef92e95952b3c4245abf76 /zenserver/upstream/upstreamcache.h | |
| parent | Get access token from auth mgr. (diff) | |
| parent | Compile fix (diff) | |
| download | zen-bd43839e042425d72b584b33c7dbb86dabc95e12.tar.xz zen-bd43839e042425d72b584b33c7dbb86dabc95e12.zip | |
Merged main.
Diffstat (limited to 'zenserver/upstream/upstreamcache.h')
| -rw-r--r-- | zenserver/upstream/upstreamcache.h | 24 |
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; |