aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcache.h
diff options
context:
space:
mode:
authormattpetersepic <[email protected]>2022-01-25 06:57:47 -0700
committerGitHub <[email protected]>2022-01-25 06:57:47 -0700
commitbd85a74a9d15fd676a6677fbd4d5ab4e3dcb0d42 (patch)
treee59bd4eccbc667088e74e989f2cfbbf82c6926c0 /zenserver/cache/structuredcache.h
parentFixed unexpected abort() call when joining an unjoinable thread (diff)
downloadzen-bd85a74a9d15fd676a6677fbd4d5ab4e3dcb0d42.tar.xz
zen-bd85a74a9d15fd676a6677fbd4d5ab4e3dcb0d42.zip
Cachepolicy (#36)
* Copy CachePolicy implementation from UE5/Release-5.0. Add backwards compatability for clients and upstreams that are using the old protocol. * Add RefPtr templated move operator and constructor, so that RefPtr<const Foo*> A = std::move(RefPtr<Foo*>()) will do a move. * Fix broken CachePolicy tests and add tests for new Save/Load. * Remove TODO comments * CachePolicy Save/Load Fixes from codereview * Fix comment to match code change. * Remove backwards compatibility for CachePolicy change. Convert policy string tokens to PascalCase. Fix tests for new policy text. Change ParseCachePolicy to assert string is non-empty and always succeed. * Fix release build: use ZEN_WITH_TESTS define
Diffstat (limited to 'zenserver/cache/structuredcache.h')
-rw-r--r--zenserver/cache/structuredcache.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h
index 1bf3940e7..a7ecba845 100644
--- a/zenserver/cache/structuredcache.h
+++ b/zenserver/cache/structuredcache.h
@@ -41,7 +41,7 @@ enum class CachePolicy : uint32_t;
*
* Additionally, attachments may be addressed as:
*
- * {BucketId}/{KeyHash}/{PayloadHash}
+ * {BucketId}/{KeyHash}/{ValueHash}
*
* Where the two initial components are the same as for the main endpoint
*
@@ -84,12 +84,12 @@ private:
};
[[nodiscard]] bool ValidateKeyUri(zen::HttpServerRequest& Request, CacheRef& OutRef);
- void HandleCacheRecordRequest(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy);
- void HandleGetCacheRecord(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy);
- void HandlePutCacheRecord(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy);
- void HandleCachePayloadRequest(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy);
- void HandleGetCachePayload(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy);
- void HandlePutCachePayload(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy);
+ void HandleCacheRecordRequest(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy PolicyFromURL);
+ void HandleGetCacheRecord(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy PolicyFromUrl);
+ void HandlePutCacheRecord(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy PolicyFromURL);
+ void HandleCachePayloadRequest(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy PolicyFromURL);
+ void HandleGetCachePayload(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy PolicyFromURL);
+ void HandlePutCachePayload(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy PolicyFromURL);
void HandleRpcRequest(zen::HttpServerRequest& Request);
void HandleRpcGetCacheRecords(zen::HttpServerRequest& Request, CbObjectView BatchRequest);
void HandleRpcGetCachePayloads(zen::HttpServerRequest& Request, CbObjectView BatchRequest);