BlueForge Docs

client.cdn.purgeProject

Purge all CDN cache entries for a project.

Signature

class Client {
  cdn: {
    purgeProject(projectSlug: string): Promise<{ success: boolean; purgedUrls: string[] }>
  }
}

Parameters

NameTypeRequiredNotes
projectSlug
string
yesProject 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

ErrorCondition
ApiError
API request failed
NetworkError
Network issue

Pitfalls

  • Broad operation — this invalidates the entire project cache; prefer
    purge
    with specific URLs for targeted invalidation
  • 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}