Simple cache with hooks for initialization of stored objects via createInstance(id: ID) function.
The only exposed (public) function is apply(id: ID), which retrieves a cached object or tries to create one if possible.
Note that when ids are provided and eagerInit is set to true, the corresponding objects are created and cached on startup.
Simple cache with hooks for initialization of stored objects via
createInstance(id: ID)function. The only exposed (public) function isapply(id: ID), which retrieves a cached object or tries to create one if possible. Note that when ids are provided andeagerInitis set to true, the corresponding objects are created and cached on startup.The key type
The cached object type