class CachedManager

extends

DataManager<Key, Holds, Resolvable>
abstract
export abstract class CachedManager<Key, Holds, Resolvable> extends DataManager<Key, Holds, Resolvable>

Manages the API methods of a data model with a mutable cache of instances.

Constructors

constructor(
client: Client<true>
holds: Constructable<Holds>
iterable?: Iterable<Holds>
)

Constructs a new instance of the CachedManager class

Type Parameters

Key

Holds

Resolvable

readonly
cache : Collection<Key, Holds>

The cache of items for this manager.

Inherited from: DataManager

readonly
client : Client

The client that instantiated this Manager

Inherited from: BaseManager

readonly
holds : Constructable<Holds>

The data structure belonging to this manager.

Inherited from: DataManager

resolve(
idOrInstance: Holds
) : Holds

Resolves a data entry to a data Object.

Returns: An instance from this Manager

resolveId(
idOrInstance: Key | Holds
) : Key

Resolves a data entry to an instance id.

valueOf() : Collection<Key, Holds>

Inherited from: DataManager