SimpleCacheEntry

Interfacein cache@fastly/js-compute 4.0.0View source

Represents an entry retrieved from the SimpleCache.

Properties

Provides access to the entry's contents as a ReadableStream.

bodyUsed

booleanread-onlyView source

Indicates whether the body has been read yet.

Methods

arrayBuffer

View source
arrayBuffer(): Promise<ArrayBuffer>

Reads the entry's stream to completion and returns the result as an ArrayBuffer.

Returns

json(): Promise<object>

Reads the entry's stream to completion and parses the result as JSON.

Returns

Promise<object>
text(): Promise<string>

Reads the entry's stream to completion and returns the result as a string, decoded using UTF-8.

Returns

Promise<string>