Skip to content

Commit

Permalink
Fix on operation update
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Aug 8, 2024
1 parent c1c840e commit 9cf989c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/objectcachev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ class ObjectCacheV2 {

template <typename KeyType, typename Ctor>
Borrow update(KeyType&& key, Ctor&& ctor) {
auto box = __find_or_create_box(std::forward<KeyType>(key));
auto& box = __find_or_create_box(std::forward<KeyType>(key));
DEFER(box.release());
auto r = ctor();
auto r = std::shared_ptr<V>(ctor());
box.update(r, photon::now);
return Borrow(this, box, r);
return Borrow(this, &box, r);
}

ObjectCacheV2(uint64_t lifespan)
Expand Down

0 comments on commit 9cf989c

Please sign in to comment.