aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/cacherpc.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-05-30 14:44:34 +0200
committerGitHub Enterprise <[email protected]>2024-05-30 14:44:34 +0200
commit8ce1dc72cce381b2adae256504331f2e8893f262 (patch)
treedf5ab56ce8cdf0f6664ed611f4cf1fb848718ea6 /src/zenstore/cache/cacherpc.cpp
parentworkspaces review feedback (diff)
downloadzen-8ce1dc72cce381b2adae256504331f2e8893f262.tar.xz
zen-8ce1dc72cce381b2adae256504331f2e8893f262.zip
cache optimizations (#88)
* message formatting optimizations * bump iostorecompression small value threshold to 1MB
Diffstat (limited to 'src/zenstore/cache/cacherpc.cpp')
-rw-r--r--src/zenstore/cache/cacherpc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zenstore/cache/cacherpc.cpp b/src/zenstore/cache/cacherpc.cpp
index d56ceb98e..d28eda8c4 100644
--- a/src/zenstore/cache/cacherpc.cpp
+++ b/src/zenstore/cache/cacherpc.cpp
@@ -683,7 +683,7 @@ CacheRpcHandler::HandleRpcGetCacheRecords(const CacheRequestContext& Context, Cb
bool StoreLocal = EnumHasAllFlags(ValuePolicy, CachePolicy::StoreLocal) && AreDiskWritesAllowed();
if (const CbAttachment* Attachment = Params.Package.FindAttachment(Value.ContentId))
{
- if (CompressedBuffer Compressed = Attachment->AsCompressedBinary())
+ if (const CompressedBuffer& Compressed = Attachment->AsCompressedBinary())
{
Request.Source = Params.Source;
Value.Exists = true;
@@ -839,7 +839,7 @@ CacheRpcHandler::HandleRpcPutCacheValues(const CacheRequestContext& Context, con
{
if (Attachment->IsCompressedBinary())
{
- CompressedBuffer Chunk = Attachment->AsCompressedBinary();
+ const CompressedBuffer& Chunk = Attachment->AsCompressedBinary();
if (EnumHasAllFlags(Policy, CachePolicy::StoreRemote))
{
// TODO: Implement upstream puts of CacheValues with StoreLocal == false.