Skip to content

Commit ad6b607

Browse files
authored
chore(main): release 3.9.0 (#728)
1 parent 4e81fc7 commit ad6b607

File tree

708 files changed

+25962
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

708 files changed

+25962
-3
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# Changelog
22

33

4+
## 3.9.0 (2024-03-02)
5+
6+
7+
### Added
8+
9+
* Add a EdgeRateLimiter JavaScript Class which enables edge-rate-limiting by utilising a RateCounter and a PenaltyBox instance ([#732](https://github.com/fastly/js-compute-runtime/issues/732)) ([4e81fc7](https://github.com/fastly/js-compute-runtime/commit/4e81fc7dbec33a5a90743e389642e0ced5294ff1))
10+
* Add a PenaltyBox JavaScript Class which can be used standalone for adding and checking if an entry is in the penalty-box ([#731](https://github.com/fastly/js-compute-runtime/issues/731)) ([bfe1e15](https://github.com/fastly/js-compute-runtime/commit/bfe1e15460cb2aa0da3cfa356fbf23d38f5af5ba))
11+
* Add a RateCounter JavaScript Class which can be used standalone for counting and rate calculations ([#730](https://github.com/fastly/js-compute-runtime/issues/730)) ([0f6036f](https://github.com/fastly/js-compute-runtime/commit/0f6036f02f497345df01dbce731eb502fd406d27))
12+
* implement and expose JavaScript classes for Fastly's Compute Core Cache feature set ([#566](https://github.com/fastly/js-compute-runtime/issues/566)) ([94f4038](https://github.com/fastly/js-compute-runtime/commit/94f4038df7ca2bfd8beef964865eb7f900b1bc04))
13+
14+
15+
### Fixed
16+
17+
* disable the portable-baseline-tier for async functions for now ([#733](https://github.com/fastly/js-compute-runtime/issues/733)) ([4928243](https://github.com/fastly/js-compute-runtime/commit/4928243a380adfb6073a909e41ab7eb4c0d569b4))
18+
419
## 3.8.3 (2024-02-21)
520

621

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.age
8+
9+
The **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.
10+
11+
## Syntax
12+
13+
```js
14+
age()
15+
```
16+
17+
### Parameters
18+
19+
None.
20+
21+
### Return value
22+
23+
A `number` which represents the current age in milliseconds of the cached item.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.body
8+
9+
The **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.
10+
11+
Only one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.
12+
13+
## Syntax
14+
15+
```js
16+
body(options)
17+
```
18+
19+
### Parameters
20+
21+
- `options` _: object_ __optional__
22+
- `start` _: number_
23+
- The offset from which to start the range.
24+
- `end` _: number_
25+
- How long the range should be.
26+
27+
### Return value
28+
29+
A `ReadableStream` which contains the cached item contents.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.close
8+
9+
The **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.
10+
11+
## Syntax
12+
13+
```js
14+
close()
15+
```
16+
17+
### Parameters
18+
19+
None.
20+
21+
### Return value
22+
23+
`undefined`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.hits
8+
9+
The **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.
10+
11+
Note: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.
12+
13+
## Syntax
14+
15+
```js
16+
hits()
17+
```
18+
19+
### Parameters
20+
21+
None.
22+
23+
### Return value
24+
25+
A `number` which represents the number of cache hits to this cached item.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.length
8+
9+
The **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.
10+
11+
The length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.
12+
13+
## Syntax
14+
15+
```js
16+
length()
17+
```
18+
19+
### Parameters
20+
21+
None.
22+
23+
### Return value
24+
25+
A `number` or `null` which represents the current length of the cached item.
26+
27+
`null` is returned if the length is currently unknown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.maxAge
8+
9+
The **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.
10+
11+
## Syntax
12+
13+
```js
14+
maxAge()
15+
```
16+
17+
### Parameters
18+
19+
None.
20+
21+
### Return value
22+
23+
A `number` which represents the time in milliseconds for which the cached item is considered fresh.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.staleWhileRevalidate
8+
9+
The **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.
10+
11+
## Syntax
12+
13+
```js
14+
staleWhileRevalidate()
15+
```
16+
17+
### Parameters
18+
19+
None.
20+
21+
### Return value
22+
23+
A `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.state
8+
9+
The **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.
10+
11+
## Syntax
12+
13+
```js
14+
state()
15+
```
16+
17+
### Parameters
18+
19+
None.
20+
21+
### Return value
22+
23+
A `CacheState` instance which reflects the current state of this `CacheEntry` instance.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheEntry.userMetadata
8+
9+
The **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.
10+
11+
## Syntax
12+
13+
```js
14+
userMetadata()
15+
```
16+
17+
### Parameters
18+
19+
None.
20+
21+
### Return value
22+
23+
An `ArrayBuffer` which contains the user-controlled metadata associated with the cached item.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheState.found
8+
9+
The **`found`** method of the `CacheState` interface returns `true` if a cached item was located.
10+
11+
Even if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.
12+
13+
## Syntax
14+
15+
```js
16+
found()
17+
```
18+
19+
### Parameters
20+
21+
None.
22+
23+
### Return value
24+
25+
A `boolean` which represents whether a cached item was located or not.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheState.mustInsertOrUpdate
8+
9+
The **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.
10+
11+
12+
## Syntax
13+
14+
```js
15+
mustInsertOrUpdate()
16+
```
17+
18+
### Parameters
19+
20+
None.
21+
22+
### Return value
23+
24+
A `boolean` which represents whether a fresh cached item was found not.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheState.stale
8+
9+
The **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.
10+
11+
A cached item is stale if its age is greater than its `maxAge` period.
12+
13+
## Syntax
14+
15+
```js
16+
stale()
17+
```
18+
19+
### Parameters
20+
21+
None.
22+
23+
### Return value
24+
25+
A `boolean` which represents whether the cached item is stale or not.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
hide_title: false
3+
hide_table_of_contents: false
4+
pagination_next: null
5+
pagination_prev: null
6+
---
7+
# CacheState.usable
8+
9+
The **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.
10+
11+
A cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.
12+
13+
## Syntax
14+
15+
```js
16+
usable()
17+
```
18+
19+
### Parameters
20+
21+
None.
22+
23+
### Return value
24+
25+
A `boolean` which represents whether a cached item is usable or not.

0 commit comments

Comments
 (0)