22 [[nodiscard]] std::shared_ptr<Resource> Find(
const std::type_index& typeIndex,
const Node& node)
const;
25 [[nodiscard]] std::shared_ptr<T> Find(
const Node& node)
const
27 return std::dynamic_pointer_cast<T>(Find(
typeid(T), node));
30 void Add(
const Node& node,
const std::shared_ptr<Resource>& resource);
31 void Remove(
const std::shared_ptr<Resource>& resource);
34 std::unordered_map<std::type_index, std::map<Node, std::shared_ptr<Resource>>> resources_;
35 std::chrono::steady_clock::time_point last_purge_time_;
36 std::chrono::seconds purge_interval_ = std::chrono::seconds(5);