Why uvm_config_db needs m_rsc?

Even though uvm_config_db extended from uvm_resource_db, it is mostly built on top of uvm_resource_pool directly. I’m confused about one data member in uvm_config_db, m_rsc. It is declared as a uvm_pool.


static uvm_pool#(string,uvm_resource#(T)) m_rsc[uvm_component];

I roughly remember somewhere I read that m_rsc is used as “cache” but I still couldn’t figure out/justify its usage.

get() is straightforward: rp.lookup_regex_names is used to return a matching rq (resource queue). Then r (resource) will be returned through get_highest_precedence. During the whole process, m_rsc is NOT involved.

set() gets trickier. Why we have to use m_rsc? Can we go directly to rp (resource pool) again and update accordingly, similar to get()? I don’t see a convincing reason to use m_rsc.