Skip to content

Cached text payloads are returned as buffers #90

Description

@vrugtehagel

When using type: 'text', cached responses are returned as buffers instead of strings. For example:

import Fetch from '@11ty/eleventy-fetch'

const response = await Fetch('https://11ty.dev/', {
	duration: '1d',
	type: 'text',
})

console.log(response.constructor.name)

When running this for the first time, String is logged; for subsequent runs this returns Buffer until the cache runs out.

This affects versions v5.1.0-beta.1 and up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions