// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include #include #include "cachestore.h" #include "upstream/jupiter.h" namespace zen { class CloudCacheClient; /** * New-style cache service. Imposes constraints on keys, supports blobs and * structured values * * The storage strategy is as follows: * * - * * - * */ class HttpStructuredCacheService : public zen::HttpService { public: HttpStructuredCacheService(std::filesystem::path RootPath, zen::CasStore& InStore); ~HttpStructuredCacheService(); virtual const char* BaseUri() const override; virtual void HandleRequest(zen::HttpServerRequest& Request) override; private: struct CacheRef { std::string BucketSegment; IoHash HashKey; Oid PayloadId; }; [[nodiscard]] bool ValidateUri(zen::HttpServerRequest& Request, CacheRef& OutRef); zen::CasStore& m_CasStore; ZenCacheStore m_CacheStore; RefPtr m_Cloud; }; } // namespace zen