Remove source storage caching in StorageComparer

Created on 2 July 2024, 2 months ago

Problem/Motivation

In πŸ“Œ StorageComparer should not wrap sourceStorage with a memory cache if it extends \Drupal\Core\Config\FileStorage Fixed we removed source storage caching if the source storage is a FileStorage but actually if we did πŸ“Œ Allow parsing and writing PHP constants and enums in YAML files Needs work we will undo it. Unfortunately the strategy of adding a cache here is tricky because we accept so many storage types. It needs to be up to the caller to decide this. The current implementation and the previous one are examples of premature optimisations - prior to πŸ“Œ StorageComparer should not wrap sourceStorage with a memory cache if it extends \Drupal\Core\Config\FileStorage Fixed in the most usual usage of storage comparer (i.e. reading config from disk during an import) we are creating a double cache.

Proposed resolution

Remove the cache wrapper. It is an internal implementation detail and add comments to the class about using a cache wrapper if you need to.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

NOne

Release notes snippet

N/a

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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