diff --git a/examples/multitier_cache/main.cpp b/examples/multitier_cache/main.cpp index 28990c341f..800c0c7cfa 100644 --- a/examples/multitier_cache/main.cpp +++ b/examples/multitier_cache/main.cpp @@ -57,7 +57,7 @@ bool put(CacheKey key, const std::string& value) { if (!handle) { return false; // cache may fail to evict due to too many pending writes } - std::memcpy(handle->getWritableMemory(), value.data(), value.size()); + std::memcpy(handle->getMemory(), value.data(), value.size()); gCache_->insertOrReplace(handle); return true; }