PHP 7.4.33
Preview: cache.d.ts Size: 5.27 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/cache.d.ts
export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache'

export {
  revalidatePath,
  revalidateTag,
  unstable_expirePath,
  unstable_expireTag,
} from 'next/dist/server/web/spec-extension/revalidate'

export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store'

export { cacheTag as unstable_cacheTag } from 'next/dist/server/use-cache/cache-tag'

/**
 * Cache this `"use cache"` for a timespan defined by the `"default"` profile.
 * ```
 *   stale:      300 seconds (5 minutes)
 *   revalidate: 900 seconds (15 minutes)
 *   expire:     never
 * ```
 *
 * This cache may be stale on clients for 5 minutes before checking with the server.
 * If the server receives a new request after 15 minutes, start revalidating new values in the background.
 * It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
 */
export function unstable_cacheLife(profile: 'default'): void

/**
 * Cache this `"use cache"` for a timespan defined by the `"seconds"` profile.
 * ```
 *   stale:      0 seconds
 *   revalidate: 1 seconds
 *   expire:     1 seconds
 * ```
 *
 * This cache may be stale on clients for 0 seconds before checking with the server.
 * This cache will expire after 1 seconds. The next request will recompute it.
 */
export function unstable_cacheLife(profile: 'seconds'): void

/**
 * Cache this `"use cache"` for a timespan defined by the `"minutes"` profile.
 * ```
 *   stale:      300 seconds (5 minutes)
 *   revalidate: 60 seconds (1 minute)
 *   expire:     3600 seconds (1 hour)
 * ```
 *
 * This cache may be stale on clients for 5 minutes before checking with the server.
 * If the server receives a new request after 1 minute, start revalidating new values in the background.
 * If this entry has no traffic for 1 hour it will expire. The next request will recompute it.
 */
export function unstable_cacheLife(profile: 'minutes'): void

/**
 * Cache this `"use cache"` for a timespan defined by the `"hours"` profile.
 * ```
 *   stale:      300 seconds (5 minutes)
 *   revalidate: 3600 seconds (1 hour)
 *   expire:     86400 seconds (1 day)
 * ```
 *
 * This cache may be stale on clients for 5 minutes before checking with the server.
 * If the server receives a new request after 1 hour, start revalidating new values in the background.
 * If this entry has no traffic for 1 day it will expire. The next request will recompute it.
 */
export function unstable_cacheLife(profile: 'hours'): void

/**
 * Cache this `"use cache"` for a timespan defined by the `"days"` profile.
 * ```
 *   stale:      300 seconds (5 minutes)
 *   revalidate: 86400 seconds (1 day)
 *   expire:     604800 seconds (1 week)
 * ```
 *
 * This cache may be stale on clients for 5 minutes before checking with the server.
 * If the server receives a new request after 1 day, start revalidating new values in the background.
 * If this entry has no traffic for 1 week it will expire. The next request will recompute it.
 */
export function unstable_cacheLife(profile: 'days'): void

/**
 * Cache this `"use cache"` for a timespan defined by the `"weeks"` profile.
 * ```
 *   stale:      300 seconds (5 minutes)
 *   revalidate: 604800 seconds (1 week)
 *   expire:     2592000 seconds (30 days)
 * ```
 *
 * This cache may be stale on clients for 5 minutes before checking with the server.
 * If the server receives a new request after 1 week, start revalidating new values in the background.
 * If this entry has no traffic for 30 days it will expire. The next request will recompute it.
 */
export function unstable_cacheLife(profile: 'weeks'): void

/**
 * Cache this `"use cache"` for a timespan defined by the `"max"` profile.
 * ```
 *   stale:      300 seconds (5 minutes)
 *   revalidate: 2592000 seconds (30 days)
 *   expire:     never
 * ```
 *
 * This cache may be stale on clients for 5 minutes before checking with the server.
 * If the server receives a new request after 30 days, start revalidating new values in the background.
 * It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
 */
export function unstable_cacheLife(profile: 'max'): void

/**
 * Cache this `"use cache"` using a custom profile "...".
 * ```
 *   stale: ... // seconds
 *   revalidate: ... // seconds
 *   expire: ... // seconds
 * ```
 *
 * You can define custom profiles in `next.config.ts`.
 */
export function unstable_cacheLife(profile: string): void

/**
 * Cache this `"use cache"` using a custom timespan.
 * ```
 *   stale: ... // seconds
 *   revalidate: ... // seconds
 *   expire: ... // seconds
 * ```
 *
 * This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
 *
 * If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
 */
export function unstable_cacheLife(profile: {
  /**
   * This cache may be stale on clients for ... seconds before checking with the server.
   */
  stale?: number
  /**
   * If the server receives a new request after ... seconds, start revalidating new values in the background.
   */
  revalidate?: number
  /**
   * If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
   */
  expire?: number
}): void

Directory Contents

Dirs: 9 × Files: 50
Name Size Perms Modified Actions
compat DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
dist DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
font DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
legacy DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:30
Edit Download
types DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
38 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
50 B lrw-r--r-- 2025-03-28 11:04:38
Edit Download
89 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
46 B lrw-r--r-- 2025-03-28 11:04:39
Edit Download
42 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
54 B lrw-r--r-- 2025-03-28 11:04:39
Edit Download
5.27 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.46 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
36 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
48 B lrw-r--r-- 2025-03-28 11:04:39
Edit Download
149 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
70 B lrw-r--r-- 2025-03-28 11:04:39
Edit Download
44 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
56 B lrw-r--r-- 2025-03-28 11:04:39
Edit Download
109 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
51 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
113 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
54 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
97 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
48 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
93 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
47 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
101 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
51 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
141 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
229 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
123 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
61 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
783 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
109 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
51 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.05 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
93 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
47 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
52 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
64 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
48 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
60 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
10.76 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
3.15 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
101 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
49 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
101 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
49 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.19 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.45 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
68 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
14 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
41 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
53 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).