Skip to content

[5.x]: GraphQL cache headers are set to 1 year for data that should never be cached #18348

@MatthiasBrodelet

Description

@MatthiasBrodelet

What happened?

Description

We use the graphQL api to fetch all products from Craft Commerce.
This request gets a cache header of a year while the data is already stale after a few hours.
This means that customers are seeing wrong data.

enableGraphqlCaching is set to false.

Steps to reproduce

  1. Go to https://www.the-house.be/nl/kopen/goud/beursmunten
  2. Look at the graphql request cache header

Expected behavior

The cache should be invalidated when some data has changed in the commerce products. Or it should not cache at all...

Actual behavior

It caches the data for a year.

Craft CMS version

5.9.2

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions