register<C extends E> method
Adds a new cache for a subtype C of E, allowing you to call query.
If the cache already exists this operation is a no-op.
If the set is not empty, the current elements will be re-sorted.
It is recommended to register all desired types at the beginning of your application to avoid recomputing the existing elements upon registration.
Implementation
@override
void register<C extends E>() {
if (isRegistered<C>()) {
return;
}
_cache[C] = _CacheEntry<C, E>(
_filter<C>(),
);
}