Invalid service definition for cache services

Created on 18 July 2024, about 2 months ago
Updated 29 July 2024, about 1 month ago

Problem/Motivation

There are 3 caches now, the memory bin, the regular one and the chain bundling them together.

Both the chain and the memory bin use a cache.bin.memory tag, but nothing outside of group module uses or references that.

All cache bins must be tagged with cache.bin so that they are picked up by the cache tag invalidator for example.

Additionally, it can be improved by making the memory backend use MemoryCache instead of MemoryBackend and make it private, based on how jsonapi is doing it. This ensures that it is never accessed directly and MemoryCache allows to skip serialize/unserialize calls.

This wasn't in a release yet, so that shouldn't be an issue.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

3.3

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
  • Merge request !168correctly define memory and chain cache bin → (Open) created by Berdir
  • Status changed to Needs review about 2 months ago
  • 🇨🇭Switzerland Berdir Switzerland

    Created a merge request.

    As mentioned on slack, I'm very confused that this didn't cause any test issues?

  • Pipeline finished with Success
    about 2 months ago
    Total: 1079s
    #228032
  • 🇨🇭Switzerland Berdir Switzerland

    Ah, I understand, 2.3.x requires 10.3 and this depends on 📌 Fix MemoryCache discovery and DX Needs review , had not seen that. not sure I really understand that change. Having both the chain and the inner memory bin tagged with cache.bin.memory means that those inner memory bins are actually invalidated twice. And the chain isn't a only a memory bin?

  • 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

    We can choose not to tag the chain as a memory bin, that is an oversight because we used to need that where jsonapi had no proper way of declaring its memory cache backend. As I copied from there, I also copied over the double work.

    Given how both inner backends are now properly declared, there is no longer a need for the ChainBackend to be declared as a backend itself.

  • Status changed to Needs work about 2 months ago
  • 🇨🇭Switzerland Berdir Switzerland

    Yes, not 100% sure about the implications, but I guess that would make sense, but that's a minor performance improvement.

  • Status changed to Needs review about 1 month ago
  • 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

    Pushed discussed change to the MR.

Production build 0.71.5 2024