aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcache.h
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-09-17 14:46:28 +0200
committerPer Larsson <[email protected]>2021-09-17 14:46:28 +0200
commit0d787afc539113fb4570c958f14a66f996b0061c (patch)
tree86659ec8bd96fd860aab99eafe775f085b16eefb /zenserver/cache/structuredcache.h
parentConst correct. (diff)
downloadzen-0d787afc539113fb4570c958f14a66f996b0061c.tar.xz
zen-0d787afc539113fb4570c958f14a66f996b0061c.zip
Initial support for cache policies.
Diffstat (limited to 'zenserver/cache/structuredcache.h')
-rw-r--r--zenserver/cache/structuredcache.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h
index 8289fd700..796b21d1f 100644
--- a/zenserver/cache/structuredcache.h
+++ b/zenserver/cache/structuredcache.h
@@ -17,6 +17,7 @@ namespace zen {
class CasStore;
class CidStore;
class UpstreamCache;
+enum class CachePolicy : uint8_t;
/**
* Structured cache service. Imposes constraints on keys, supports blobs and
@@ -70,8 +71,8 @@ private:
};
[[nodiscard]] bool ValidateKeyUri(zen::HttpServerRequest& Request, CacheRef& OutRef);
- void HandleCacheRecordRequest(zen::HttpServerRequest& Request, CacheRef& Ref);
- void HandleCachePayloadRequest(zen::HttpServerRequest& Request, CacheRef& Ref);
+ void HandleCacheRecordRequest(zen::HttpServerRequest& Request, CacheRef& Ref, CachePolicy Policy);
+ void HandleCachePayloadRequest(zen::HttpServerRequest& Request, CacheRef& Ref, CachePolicy Policy);
void HandleCacheBucketRequest(zen::HttpServerRequest& Request, std::string_view Bucket);
spdlog::logger& Log() { return m_Log; }