cache_container table is not empty after clear the cache

Created on 30 October 2024, 22 days ago

cache_container table is not empty after attempting to clear the cache

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.3 ✨

Component

cache system

Created by

πŸ‡―πŸ‡΄Jordan mahmoud barhouma

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

Comments & Activities

  • Issue created by @mahmoud barhouma
  • πŸ‡―πŸ‡΄Jordan mahmoud barhouma

    table cache_container not truncate when clear cache, the problem affect at Drupal core 10.3.1,

    steps to reproduce
    1- clear cache drush cr
    2- drush sqsl-cli
    3- select * from cache_container the table is not empty

  • cr means cache:rebuild. It doesn't only clear the caches. It rebuilds them:

    Rebuild all caches.
    
    This is a copy of core/rebuild.php.
    
    Options:
     --cache-clear[=CACHE-CLEAR] Set to 0 to suppress normal cache clearing; the caller should then clear if needed. [default: true]
     --no-cache-clear            Negate --cache-clear option.
    
    Global options:
    -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
    -y, --yes            Auto-accept the default for all user prompts. Equivalent to --no-interaction.
    -l, --uri=URI        A base URL for building links and selecting a multi-site. Defaults to https://default.
                         To see all global options, run `drush topic` and pick the first choice.
    
    Aliases: cr, rebuild, cache-rebuild
    

    So it is working properly. Why is this a bug?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    If you don't have a container, you don't have a site

    The cache rebuild rebuilds the container so your site works

  • πŸ‡―πŸ‡΄Jordan mahmoud barhouma

    When dumping the database, the database file is very large. The database size is 50 GB, but after I truncate the cache tables, the database size reduces to 350 MB.

    Here are the commands I used on the database:

    TRUNCATE cache_bootstrap;
    TRUNCATE cache_config;
    TRUNCATE cache_container;
    TRUNCATE cache_data;
    TRUNCATE cache_default;
    TRUNCATE cache_discovery;
    TRUNCATE cache_dynamic_page_cache;
    TRUNCATE cache_entity;
    TRUNCATE cache_menu;
    TRUNCATE cache_page;
    TRUNCATE cache_render;
    TRUNCATE cache_toolbar;
    TRUNCATE cachetags;

  • Without having some idea which of those tables is large and why, it's difficult to advise.

Production build 0.71.5 2024