integrated object cache into session and added message bus to object_cache and update tests

This commit is contained in:
2026-05-22 15:26:16 +02:00
parent ddf19bbf07
commit 5ec7c13420
8 changed files with 212 additions and 21 deletions
+12
View File
@@ -53,6 +53,18 @@ public:
}
}
void resolver(std::weak_ptr<object_resolver<Type>> resolver) {
std::lock_guard lock(mutex_);
resolver_ = std::move(resolver);
}
[[nodiscard]] std::shared_ptr<Type> object() const {
if (!obj_) {
std::ignore = resolve();
}
return obj_;
}
void invalidate() {
std::lock_guard lock(mutex_);
obj_.reset();