-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose purgeSurrogateKey hostcall (#953)
- Loading branch information
1 parent
aea826f
commit 4468e3c
Showing
14 changed files
with
1,287 additions
and
5,999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
|
||
# purgeSurrogateKey | ||
|
||
The **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache. | ||
|
||
There are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items | ||
from the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing | ||
orgin load, while also enabling stale revalidations. | ||
|
||
See the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations. | ||
|
||
## Syntax | ||
|
||
```js | ||
purgeSurrogateKey(surrogateKey, soft?) | ||
``` | ||
### Parameters | ||
- `surrogateKey` _: string_ | ||
- The surrogate key string | ||
- `soft?` _: boolean_ | ||
- Enables a soft purge, retaining stale entries in the cache. Default is a hard purge. | ||
### Return value | ||
`undefined`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
hide_title: false | ||
hide_table_of_contents: false | ||
pagination_next: null | ||
pagination_prev: null | ||
--- | ||
|
||
# vCpuTime | ||
|
||
The **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds. | ||
|
||
## Syntax | ||
|
||
```js | ||
vCpuTime() | ||
``` | ||
|
||
### Parameters | ||
|
||
None. | ||
|
||
### Return value | ||
|
||
`undefined`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.