diff options
Diffstat (limited to 'zenserver/cache/structuredcache.h')
| -rw-r--r-- | zenserver/cache/structuredcache.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h index e2ab60928..72aeecfd5 100644 --- a/zenserver/cache/structuredcache.h +++ b/zenserver/cache/structuredcache.h @@ -3,12 +3,16 @@ #pragma once #include <zencore/httpserver.h> +#include <zencore/refcount.h> -#include "cachestore.h" +#include "structuredcachestore.h" #include "upstream/jupiter.h" namespace zen { +class CloudCacheClient; +class CidStore; + /** * New-style cache service. Imposes constraints on keys, supports blobs and * structured values @@ -40,7 +44,7 @@ namespace zen { class HttpStructuredCacheService : public zen::HttpService { public: - HttpStructuredCacheService(std::filesystem::path RootPath, zen::CasStore& InStore); + HttpStructuredCacheService(std::filesystem::path RootPath, zen::CasStore& InStore, zen::CidStore& InCidStore); ~HttpStructuredCacheService(); virtual const char* BaseUri() const override; @@ -52,12 +56,17 @@ private: { std::string BucketSegment; IoHash HashKey; + IoHash PayloadId; }; [[nodiscard]] bool ValidateUri(zen::HttpServerRequest& Request, CacheRef& OutRef); + void HandleCacheRecordRequest(zen::HttpServerRequest& Request, CacheRef& Ref); + void HandleCachePayloadRequest(zen::HttpServerRequest& Request, CacheRef& Ref); - zen::CasStore& m_CasStore; - ZenCacheStore m_CacheStore; + zen::CasStore& m_CasStore; + zen::CidStore& m_CidStore; + ZenCacheStore m_CacheStore; + RefPtr<CloudCacheClient> m_Cloud; }; } // namespace zen |