Problem/Motivation

While investigating (Drupal 10.3) if we should enable the new State_cache see https://metadrop.net/en/articles/what-you-need-know-enabling-state-cache-drupal-103 this module seems to be the largest in our state cache. I see this issue https://www.drupal.org/project/paragraphs_report/issues/3423079 recently moved from config to state. But the article I linked to suggests to replace the state API with the key_value one.

Steps to reproduce

On a large site run the sql commands from https://metadrop.net/en/articles/what-you-need-know-enabling-state-cache... and see size of state api.

This module was the biggest offender.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
2025-01-31_07-06-31.jpg31.67 KBnicholass
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

nicholass created an issue. See original summary.

astonvictor’s picture

FYI an example of key_value:

$keyvalue = \Drupal::keyValue('my_collection');
$keyvalue->set('token', '12345');
$value = $keyvalue->get('token');

astonvictor’s picture

Version: 2.1.1 » 2.x-dev

astonvictor’s picture

Status: Active » Needs review

should work ok now
also implemented an update hook to move data from the state to key-value.

astonvictor’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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