typeioc

Home > typeioc > ICache

ICache interface

Represents cached resolutions interface.

Signature:

export interface ICache 

Properties

Property Type Description
instance {
[name: string]: any;
}
Retrieves resolution interface directly via name. Returns service resolution instance or undefined if no resolution found

Methods

Method Description
resolve(name) Resolves an instance of a service

Remarks

Resolutions could be retrieved by name. The value of the name is computed as follows (from highest to lowest priority):

  1. name parameter for the cache method specified during resolution.

  2. name parameter used for named registrations.

  3. service parameter representing an object with the name property.

  4. service parameter representing a string object