diff options
| author | mattpetersepic <[email protected]> | 2022-01-27 10:52:07 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-27 10:52:07 -0700 |
| commit | fb1afc87a436ff6374daeaef5f7682f098a85cd7 (patch) | |
| tree | 89810fc5d85ab81cce7fdc4e26849ad0d25cf2d1 /zenserver/upstream/upstreamcache.h | |
| parent | Add batched CacheRecord put rpc (#38) (diff) | |
| download | zen-fb1afc87a436ff6374daeaef5f7682f098a85cd7.tar.xz zen-fb1afc87a436ff6374daeaef5f7682f098a85cd7.zip | |
Rename Paylod to Value to match the client side. Rename PayloadId to ValueContentId where its a hash instead of an oid.
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 16d8c7929..2087b1fba 100644 --- a/zenserver/upstream/upstreamcache.h +++ b/zenserver/upstream/upstreamcache.h @@ -27,7 +27,7 @@ struct UpstreamCacheRecord { ZenContentType Type = ZenContentType::kBinary; CacheKey Key; - std::vector<IoHash> PayloadIds; + std::vector<IoHash> ValueContentIds; }; struct UpstreamCacheOptions @@ -73,14 +73,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 { @@ -156,11 +156,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, @@ -190,11 +190,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; |