{"version":3,"file":"rx-angular-isr-models.mjs","sources":["../../../../libs/isr/models/src/cache-handler.ts","../../../../libs/isr/models/src/rx-angular-isr-models.ts"],"sourcesContent":["import { Request } from 'express';\n\n/**\n * CacheISRConfig is the configuration object that is used to store the\n * cache data in the cache handler.\n */\nexport interface CacheISRConfig {\n  revalidate: number | null; // none, 0, > 0\n  buildId?: string | null; // the id of the current build\n  errors?: string[];\n}\n\nexport interface CacheData {\n  html: string;\n  options: CacheISRConfig;\n  createdAt: number;\n}\n\nexport interface RenderVariant {\n  identifier: string;\n  detectVariant: (req: Request) => boolean;\n  simulateVariant?: (req: Request) => Request;\n}\n\nexport interface VariantRebuildItem {\n  url: string;\n  cacheKey: string;\n  reqSimulator: (req: Request) => Request;\n}\n\nexport abstract class CacheHandler {\n  abstract add(\n    cacheKey: string,\n    html: string,\n    config?: CacheISRConfig,\n  ): Promise<void>;\n\n  abstract get(cacheKey: string): Promise<CacheData>;\n\n  abstract has(cacheKey: string): Promise<boolean>;\n\n  abstract delete(cacheKey: string): Promise<boolean>;\n\n  abstract getAll(): Promise<string[]>;\n\n  abstract clearCache?(): Promise<boolean>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"MA8BsB,YAAY,CAAA;AAgBjC;;AC9CD;;AAEG;;;;"}