Do not call drupal_flush_all_caches() directly

Created on 30 June 2022, almost 2 years ago
Updated 27 January 2024, 5 months ago

Problem/Motivation

drupal_flush_all_caches() does many things, and I believe we don't need all of those in the ContentSyncConfigForm form.

In #3222577-22: ServiceNotFoundException You have requested a non-existent service "language_negotiator" - hook_modules_installed() β†’ @alexpott mentioned:

Most of the time you add drupal_flush_all_caches() to your code it's as a result of "ugh I dunno what's going on here perhaps this fixes it" and every time you do that you're doing it wrong. There are not many valid use cases for regular code that is triggered during an extension life-cycle.

I agree with him, so let's use this task to investigate what exactly should be invalidated/rebuilt once we save that config page and don't execute drupal_flush_all_caches() manually.

πŸ“Œ Task
Status

Needs review

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Matroskeen πŸ‡ΊπŸ‡¦ Ukraine, Lutsk

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024