diff options
| author | Stefan Boberg <[email protected]> | 2022-06-11 23:22:00 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-06-11 23:22:00 +0200 |
| commit | 348ae50c946b541ce935703045ab98a49d809ed4 (patch) | |
| tree | a400285c9e5ae215dc7ef3b2958ce922f48ec7bc /zenserver/upstream | |
| parent | fixed mac build ("unused" variable) (diff) | |
| parent | clang-format fix (diff) | |
| download | zen-348ae50c946b541ce935703045ab98a49d809ed4.tar.xz zen-348ae50c946b541ce935703045ab98a49d809ed4.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/upstream')
| -rw-r--r-- | zenserver/upstream/zen.cpp | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/zenserver/upstream/zen.cpp b/zenserver/upstream/zen.cpp index 0237ec346..cd6a531ca 100644 --- a/zenserver/upstream/zen.cpp +++ b/zenserver/upstream/zen.cpp @@ -408,15 +408,14 @@ ZenStructuredCacheSession::CheckHealth() } ZenCacheResult -ZenStructuredCacheSession::GetCacheRecord(std::string_view, std::string_view BucketId, const IoHash& Key, ZenContentType Type) +ZenStructuredCacheSession::GetCacheRecord(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, ZenContentType Type) { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support - // if (Namespace != ZenCacheStore::DefaultNamespace) - // { - // Uri << Namespace << "/"; - // } + if (Namespace != ZenCacheStore::DefaultNamespace) + { + Uri << Namespace << "/"; + } Uri << BucketId << "/" << Key.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); @@ -438,15 +437,17 @@ ZenStructuredCacheSession::GetCacheRecord(std::string_view, std::string_view Buc } ZenCacheResult -ZenStructuredCacheSession::GetCacheValue(std::string_view, std::string_view BucketId, const IoHash& Key, const IoHash& ValueContentId) +ZenStructuredCacheSession::GetCacheValue(std::string_view Namespace, + std::string_view BucketId, + const IoHash& Key, + const IoHash& ValueContentId) { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support - // if (Namespace != ZenCacheStore::DefaultNamespace) - // { - // Uri << Namespace << "/"; - // } + if (Namespace != ZenCacheStore::DefaultNamespace) + { + Uri << Namespace << "/"; + } Uri << BucketId << "/" << Key.ToHexString() << "/" << ValueContentId.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); @@ -473,7 +474,7 @@ ZenStructuredCacheSession::GetCacheValue(std::string_view, std::string_view Buck } ZenCacheResult -ZenStructuredCacheSession::PutCacheRecord(std::string_view, +ZenStructuredCacheSession::PutCacheRecord(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, IoBuffer Value, @@ -481,11 +482,10 @@ ZenStructuredCacheSession::PutCacheRecord(std::string_view, { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support - // if (Namespace != ZenCacheStore::DefaultNamespace) - // { - // Uri << Namespace << "/"; - // } + if (Namespace != ZenCacheStore::DefaultNamespace) + { + Uri << Namespace << "/"; + } Uri << BucketId << "/" << Key.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); @@ -510,7 +510,7 @@ ZenStructuredCacheSession::PutCacheRecord(std::string_view, } ZenCacheResult -ZenStructuredCacheSession::PutCacheValue(std::string_view, +ZenStructuredCacheSession::PutCacheValue(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, const IoHash& ValueContentId, @@ -518,11 +518,10 @@ ZenStructuredCacheSession::PutCacheValue(std::string_view, { ExtendableStringBuilder<256> Uri; Uri << m_Client.ServiceUrl() << "/z$/"; - // TODO: DE20220530: Disable adding namespace into URL until we have updated the shared instances with namespace support - // if (Namespace != ZenCacheStore::DefaultNamespace) - // { - // Uri << Namespace << "/"; - // } + if (Namespace != ZenCacheStore::DefaultNamespace) + { + Uri << Namespace << "/"; + } Uri << BucketId << "/" << Key.ToHexString() << "/" << ValueContentId.ToHexString(); cpr::Session& Session = m_SessionState->GetSession(); |