Add cache interface, factory, and basic in-mem implementation
This commit is contained in:
@@ -14,6 +14,7 @@ import {Logging} from '../service/Logging';
|
||||
import {RunLevelErrorHandler} from "./RunLevelErrorHandler";
|
||||
import {Unit, UnitStatus} from "./Unit";
|
||||
import * as dotenv from 'dotenv';
|
||||
import {CacheFactory} from "../support/cache/CacheFactory";
|
||||
|
||||
export function env(key: string, defaultValue?: any): any {
|
||||
return Application.getApplication().env(key, defaultValue)
|
||||
@@ -103,6 +104,8 @@ export class Application extends Container {
|
||||
this.bootstrapEnvironment()
|
||||
this.setupLogging()
|
||||
|
||||
this.registerFactory(new CacheFactory()) // FIXME move this somewhere else?
|
||||
|
||||
this.make<Logging>(Logging).debug(`Application root: ${this.baseDir}`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user