when is the cache invalidated showing uncached site settings labels

Created on 27 April 2020, over 4 years ago
Updated 27 July 2023, over 1 year ago

When I change the label for a site settings item it takes a while until it's uncached version is displayed on the site unless I rebuild the cache. I use the site settings twig variables to display the labels.

Could you please briefly explain what triggers cache invalidation here or link to some documentation where I can read up on this? I am not too familiar with the Cache API.

💬 Support request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

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

  • 🇬🇧United Kingdom endrukk

    To extend on the original answer: depending on what's in your site settings you'd want to invalidate the following caches:

    • cache.bootstrap
    • cache.config
    • cache.data
    • cache.default
    • cache.discovery
    • cache.entity
    • cache.menu
    • cache.render
    • cache.static

    For example: \Drupal::service('cache.config')->invalidateAll();

    Additionally \Drupal::service('router.builder')->rebuild() might be also necessary.

Production build 0.71.5 2024