Problem/Motivation

In #2575105: Use cache collector for state we added a new optional setting to allow the state key-value store to be stored as a single cache entry to improve performance. This was optional because some sites store data that shouldn't be there in state.

In Drupal 11, we can remove this setting and enable the state cache permanently.

Steps to reproduce

Proposed resolution

Deprecate $settings['state_cache'].
Remove any references to the setting and enable the state cache permanently.
Remove other deprecations introduced in #2575105: Use cache collector for state

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3436954

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:

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs change record

Since this will require sites to update their settings.php should a CR be included.

longwave’s picture

Unsure if we can use the existing change record given we only just introduced this, or if we should have a separate one: https://www.drupal.org/node/3177901

That CR also says Drupal 12+ but this issue says 11...

smustgrave’s picture

So that CR/ticket was only committed for 10.3, which isn't released yet. So imagine updating the CR to more mention this setting is only for D10.3+ and automatic in D11. Thoughts?

longwave’s picture

I think let's update the existing change record to mention Drupal 11 instead of 12 and say what to do when Drupal 11 is released.

quietone’s picture

I agree that the existing change record should be updated as needed. However, there should be 2 changes records; one for the change that happens in 10.3.0 and one for the change that happens only in 11. They are distinct events. So, there should have a CR for each.

smustgrave’s picture

Updated existing CR #3177901: State service now uses a cache collector for performance

Created new CR #3443018: Settings 'state_cache' is removed and permanently turned on

But should $this->cacheLoaded = TRUE; be added tocore/lib/Drupal/Core/State/State.php

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Updated the CR and tests were green before. I just rebased.

  • catch committed aa1cfb47 on 11.x
    Issue #3436954 by longwave, smustgrave: Remove state_cache setting in...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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