Problem/Motivation

The alter_form hook in the module is preventing Drupal from caching any pages containing a form.

Steps to reproduce

With the module enabled, any page containing a form returns a cache-control header of "must-revalidate, no-cache, private".

Proposed resolution

The line \Drupal::service('page_cache_kill_switch')->trigger(); should be within the if statement checking for a login form?

CommentFileSizeAuthor
#2 fix-caching-3198139-2.patch718 bytesnatemow
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • fix-caching Comparecompare
  • 8.x-1.x Comparecompare

Comments

simonf7 created an issue. See original summary.

natemow’s picture

StatusFileSize
new718 bytes

Here's a patch for this issue.

sokru’s picture

Priority: Normal » Major
Status: Active » Reviewed & tested by the community

Increasing the priority since this is crucial issue for high performance sites.

shrishail hiremath’s picture

Version: 8.x-2.21 » 8.x-2.27
Assigned: Unassigned » shrishail hiremath
Status: Reviewed & tested by the community » Fixed

@simonf7,

This has been fixed in the latest version of the module.

Thanks
Shrishail

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.