Skip to main content
Module

x/momentum/di/mod.ts>DiCache

Momentum is an open-source framework for building server-side Deno applications in TypeScript. It provides the paradigms and design patterns to guide developers to create robust, scalable, and enterprise-grade applications.
Latest
class DiCache
Re-export
import { DiCache } from "https://deno.land/x/momentum@v0.8.2/di/mod.ts";

Hierarchical cache used to hold resolved dependencies based on scope lifetime

Constructors

new
DiCache(parent?: DiCache)

Properties

readonly
items: unknown[]

Methods

beginScope(scope: Scope | string)
endScope(scope: Scope | string)
get<T = unknown>(diContainer: DiContainer, typeIdentifier: TypeIdentifier): T | undefined
set(
scope: Scope | string,
diContainer: DiContainer,
typeIdentifier: TypeIdentifier,
value: unknown,
)