Skip to content

404 errors are cached with »half« static caching #10758

@florianbrinkmann

Description

@florianbrinkmann

Bug description

I noticed that 404 pages are cached when half static caching is active. That’s not the case with full static caching.

How to reproduce

  • Activate half static caching
  • Create and publish two pages, one with the slug parent and one with the slug child, both on the top level of the page tree.
  • View the URL /parent/child at the frontend, you get a 404 error
  • Move the child page in the page tree below the parent page and save the page tree
  • Visit /parent/child again and you still get the 404

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 11.21.0
PHP Version: 8.3.9
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: example.com
Maintenance Mode: OFF
Timezone: UTC
Locale: de

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: null
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled
Static Caching: half
Version: 5.17.0 PRO

Installation

Other (please explain)

Additional details

We use a custom starter kit at work, where I tested it, but it’s pretty basic without much modifications.

Metadata

Metadata

Assignees

No one assigned

    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