MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / start

Method start

examples/greeting-app/src/caching-service.ts:116–124  ·  view source on GitHub ↗

* This method will be invoked when the application starts

()

Source from the content-addressed store, hash-verified

114 * This method will be invoked when the application starts
115 */
116 async start(): Promise<void> {
117 debug('Starting caching service');
118 await this.clear();
119 const ttl = await this.getTTL();
120 debug('TTL: %d', ttl);
121 this.timer = setInterval(() => {
122 this.sweep().catch(console.warn);
123 }, ttl);
124 }
125
126 /**
127 * This method will be invoked when the application stops

Callers 1

restartMethod · 0.95

Calls 3

clearMethod · 0.95
getTTLMethod · 0.95
sweepMethod · 0.95

Tested by

no test coverage detected