Move the FileCache apcu prefix handling into the apcu implementation or allow the APCu prefix to be customised

Created on 21 November 2024, 27 days ago

Problem/Motivation

DrupalKernel adds the apcu prefix as the cache prefix to FileCacheFactory.

This means that individual implementations like the APCu backend don't need to account for it.

However, it also means that if we want the DatabaseApcuFileCache to persist across deployment identifiers or Drupal versions, then we'd need to move the logic out of the factory and into the implementations.

Steps to reproduce

Proposed resolution

Need to decide if persisting across Drupal versions/identifiers is desirable before working on this - it could significantly improve cache hit rates, but it could also increase the likelihood of stale cache items if we don't manually modify the cache ID based on implementation details in parsers.

Another option would be to allow custom apcu prefixes to be defined in $settings, then sites could optimize this themselves if they really want to.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

base system

Created by

🇬🇧United Kingdom catch

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

Comments & Activities

Production build 0.71.5 2024