Last write timestamp optimization breaks cache clear

Created on 9 February 2025, 3 months ago

Problem/Motivation

drush cr doesn't seem to properly work anymore. should go through the fast chained bin, but somehow it's not doing what it should it seems. To be investigated.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland berdir Switzerland

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

Merge Requests

Comments & Activities

  • Issue created by @berdir
  • 🇨🇭Switzerland berdir Switzerland

    This can happen if \Drupal\Core\Cache\ChainedFastBackendFactory::get() bypasses the fast chained backend and just returns the consistent one directly.

    That should only happen during the installer or if apcu_fetch isn't defined, implying different extensions for CLI and webserver.

    The safe thing to do is to always update/delete the last write timestamp explicitly in that case.

  • Merge request !52add a test and workaround → (Open) created by berdir
  • 🇨🇭Switzerland berdir Switzerland

    Created a test but I'm still unsure about this scenario, something else might have been off when I've been running into this problem.

    Obviously, any write or delete directly on the consistent backend would not update the fast backend correctly, so I'm not sure this is worth fixing.

    Setting to postponed for see if anyone else runs into this.

Production build 0.71.5 2024