purgeSurrogateKey
purgeSurrogateKey(surrogateKey: string, soft?: boolean): voidPurge the given surrogate key from Fastly's HTTP and Core caches.
There are two purge modes: hard purge (the default) clears all matching items from the cache immediately, while soft purge retains stale entries in the cache, reducing origin load while enabling stale revalidations.
See the Fastly Purge documentation for more information on caching and purge operations.
Parameters
- surrogateKey: string
The surrogate key string to purge.
- soft: booleanoptional
Enable to perform a soft purge, retaining stale cache entries to reduce load on the origin server. Defaults to a hard purge.
Returns
void