diff options
Diffstat (limited to 'zenserver/cache/structuredcache.h')
| -rw-r--r-- | zenserver/cache/structuredcache.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h index 73b0825dc..b90301d84 100644 --- a/zenserver/cache/structuredcache.h +++ b/zenserver/cache/structuredcache.h @@ -3,18 +3,17 @@ #pragma once #include <zencore/httpserver.h> -#include <zencore/refcount.h> - -#include "structuredcachestore.h" -#include "upstream/jupiter.h" #include <spdlog/spdlog.h> +#include <memory> + +class ZenCacheStore; namespace zen { -class CloudCacheClient; +class CasStore; class CidStore; -class ZenStructuredCacheClient; +class UpstreamCache; /** * Structured cache service. Imposes constraints on keys, supports blobs and @@ -47,7 +46,10 @@ class ZenStructuredCacheClient; class HttpStructuredCacheService : public zen::HttpService { public: - HttpStructuredCacheService(std::filesystem::path RootPath, zen::CasStore& InStore, zen::CidStore& InCidStore); + HttpStructuredCacheService(ZenCacheStore& InCacheStore, + zen::CasStore& InCasStore, + zen::CidStore& InCidStore, + std::unique_ptr<UpstreamCache> UpstreamCache); ~HttpStructuredCacheService(); virtual const char* BaseUri() const override; @@ -69,12 +71,11 @@ private: void HandleCachePayloadRequest(zen::HttpServerRequest& Request, CacheRef& Ref); void HandleCacheBucketRequest(zen::HttpServerRequest& Request, std::string_view Bucket); - spdlog::logger m_Log; - zen::CasStore& m_CasStore; - zen::CidStore& m_CidStore; - ZenCacheStore m_CacheStore; - RefPtr<CloudCacheClient> m_Cloud; - RefPtr<ZenStructuredCacheClient> m_ZenClient; + spdlog::logger m_Log; + ZenCacheStore& m_CacheStore; + zen::CasStore& m_CasStore; + zen::CidStore& m_CidStore; + std::unique_ptr<UpstreamCache> m_UpstreamCache; }; } // namespace zen |