web.d.ts 671 B

12345678910111213141516171819
  1. import type { ResponseCacheEntry, ResponseGenerator } from './types';
  2. /**
  3. * In the web server, there is currently no incremental cache provided and we
  4. * always SSR the page.
  5. */
  6. export default class WebResponseCache {
  7. pendingResponses: Map<string, Promise<ResponseCacheEntry | null>>;
  8. previousCacheItem?: {
  9. key: string;
  10. entry: ResponseCacheEntry | null;
  11. expiresAt: number;
  12. };
  13. minimalMode?: boolean;
  14. constructor(minimalMode: boolean);
  15. get(key: string | null, responseGenerator: ResponseGenerator, context: {
  16. isManualRevalidate?: boolean;
  17. isPrefetch?: boolean;
  18. }): Promise<ResponseCacheEntry | null>;
  19. }