client.cdn.purgeProject
Purge all CDN cache entries for a project.
Signature
class Client {
cdn: {
purgeProject(projectSlug: string): Promise<{ success: boolean; purgedUrls: string[] }>
}
}
Parameters
| Name | Type | Required | Notes |
|---|---|---|---|
| | yes | Project slug |
Examples
import { Client } from '@blueforge/client'
const bf = new Client({ apiKey: process.env.BF_API_KEY!, url: 'https://your-project.blueforge.dev' })
const result = await bf.cdn.purgeProject('my-project')
console.log(`Purged ${result.purgedUrls.length} URLs`)
Throws
| Error | Condition |
|---|---|
| API request failed |
| Network issue |
Pitfalls
- Broad operation — this invalidates the entire project cache; prefer
with specific URLs for targeted invalidationpurge - Propagation delay — full-project purges may take longer to propagate than single-URL purges
- Rate limited — same 20 requests/min limit as
purge
See also
{auto-injected}
Tested against
{auto-injected}