This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'zone.js/dist/zone-node'; | |
import { APP_BASE_HREF } from '@angular/common'; | |
import { ngExpressEngine } from '@nguniversal/express-engine'; | |
import * as express from 'express'; | |
import { existsSync } from 'fs'; | |
import { join } from 'path'; | |
import * as redis from 'redis'; | |
import { AppServerModule } from './src/main.server'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type CacheEntry<T> = { | |
value: T, | |
timeout: ReturnType<typeof setTimeout>, | |
} | |
class ExpiringCache<T> { | |
private readonly cache: Record<string, CacheEntry<T>>; | |
private readonly expirationTime: number; | |
constructor(expirationTime: number = 5000) { |
OlderNewer