You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string data("new data");
// Allocate memory for the data.
auto item_handle = cache->allocate(pool_id, "key2", data.size());
// Write the data to the cache.
std::memcpy(handle->getMemory(), data.data(), data.size());
There is no handle but item_handle. Therefore, std::memcpy(handle->getMemory(), data.data(), data.size()); should be changed to std::memcpy(item_handle->getMemory(), data.data(), data.size());
The text was updated successfully, but these errors were encountered:
There is an typo in https://cachelib.org/docs/Cache_Library_User_Guides/Write_data_to_cache#write-data-to-allocated-memory-and-insert-item-handle-into-cache.
There is no
handle
butitem_handle
. Therefore,std::memcpy(handle->getMemory(), data.data(), data.size());
should be changed tostd::memcpy(item_handle->getMemory(), data.data(), data.size());
The text was updated successfully, but these errors were encountered: