packages/functions/docs/interfaces/index.PurgeApi.md
index.PurgeApi
Vercel Cache Purge APIs.
• dangerouslyDeleteBySrcImage: (src: string | string[], options?: DangerouslyDeleteOptions) => Promise<void>
▸ (src, options?): Promise<void>
Given a source image, delete all of its transformed images after a specified revalidation deadline. If accessed prior to the revalidation deadline, the stale transformed image will be served and a background task will be triggered. After the revalidation deadline is reached, the transformed image will be deleted. The default revalidation deadline is 0 and the content will be deleted immediately.
| Name | Type | Description |
|---|---|---|
src | string | string[] | The source image to delete. |
options? | DangerouslyDeleteOptions | The options for the delete that specify the revalidation deadline. |
Promise<void>
A promise that resolves when the delete is complete.
packages/functions/src/purge/types.ts:54
• dangerouslyDeleteByTag: (tag: string | string[], options?: DangerouslyDeleteOptions) => Promise<void>
▸ (tag, options?): Promise<void>
Delete all content associated with a tag or tags after a specified revalidation deadline. If accessed prior to the revalidation deadline, the stale content will be served and a background revalidation will be triggered. After the revalidation deadline is reached, the content will be deleted. The default revalidation deadline is 0 and the content will be deleted immediately.
| Name | Type | Description |
|---|---|---|
tag | string | string[] | The tag or tags to delete. |
options? | DangerouslyDeleteOptions | The options for the delete that specify the revalidation deadline. |
Promise<void>
A promise that resolves when the delete is complete.
packages/functions/src/purge/types.ts:31
• invalidateBySrcImage: (src: string | string[]) => Promise<void>
▸ (src): Promise<void>
Given a source image, invalidate all of its transformed images by marking them as stale. On the next access, the stale transformed image will be served and a background task will transform the source image.
| Name | Type | Description |
|---|---|---|
src | string | string[] | The source image to invalidate. |
Promise<void>
A promise that resolves when the invalidate is complete.
packages/functions/src/purge/types.ts:43
• invalidateByTag: (tag: string | string[]) => Promise<void>
▸ (tag): Promise<void>
Invalidate all content associated with a tag or tags by marking them as stale. On the next access to content associated with any of the tags, the stale content will be served and a background revalidation will be triggered.
| Name | Type | Description |
|---|---|---|
tag | string | string[] | The tag or tags to invalidate. |
Promise<void>
A promise that resolves when the invalidate is complete.