Module disables page cache for all pages unconditionally

Created on 29 June 2023, over 1 year ago
Updated 25 June 2024, 6 months ago

Problem/Motivation

Module disables page cache for all pages unconditionally, not only for the pages of rest plugins and/or JSONAPI endpoints.

Steps to reproduce

Install the module
Make sure that Drupal core page_cache module is installed.
Go to /admin/config/development/performance page and set "Cache" to any value, that is not "None"
Try to access the site in incognito mode of your browser.
Observe that cache headers are "Private, must-revalidate, no-cache".

Proposed resolution

Check request policy src/PageCache/DisallowAPIRequests.php and try to apply some conditions, that kill page cache only on pages where needed.
Alternatively alter routes and include kill_switch service instead of request policy.

Remaining tasks

Create patch or MR

User interface changes

no changes

API changes

Add conditions to request policy or alter routes

Data model changes

unknown

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany a.dmitriiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024