Drupal キャッシュの削除

$ drush cc all # Drupal 7
$ drush cache-rebuild # Drupal 8

または

$ drush sql-query "DELETE FROM cache"

他のキャッシュテーブルを削除するためにMySQL データベースに接続

$ sudo mysql -u root
MariaDB [(none)]> show databases;
MariaDB [(none)]> use db_d7dev.octaviadata.com;

キャッシュテーブルの確認

MariaDB [db_d7dev.octaviadata.com]> show tables like 'cache%';
+---------------------------------------------+
| Tables_in_db_d7dev.octaviadata.com (cache%) |
+---------------------------------------------+
| cache                                       |
| cache_admin_menu                            |
| cache_block                                 |
| cache_bootstrap                             |
| cache_clients                               |
| cache_entity_comment                        |
| cache_entity_field_collection_item          |
| cache_entity_file                           |
| cache_entity_node                           |
| cache_entity_paragraphs_item                |
| cache_entity_quiz_entity                    |
| cache_entity_taxonomy_term                  |
| cache_entity_taxonomy_vocabulary            |
| cache_entity_user                           |
| cache_features                              |
| cache_feeds_http                            |
| cache_field                                 |
| cache_filter                                |
| cache_form                                  |
| cache_image                                 |
| cache_l10n_update                           |
| cache_libraries                             |
| cache_menu                                  |
| cache_page                                  |
| cache_panels                                |
| cache_path                                  |
| cache_restclient                            |
| cache_rules                                 |
| cache_search_api_solr                       |
| cache_token                                 |
| cache_update                                |
| cache_variable                              |
| cache_views                                 |
| cache_views_data                            |
+---------------------------------------------+
34 rows in set (0.00 sec)

キャッシュテーブルの削除例

MariaDB [db_d7dev.octaviadata.com]> select count(*) from cache_block;
MariaDB [db_d7dev.octaviadata.com]> TRUNCATE `cache_block`;

他のテーブルも同様にTRUNCATEして終了。

MariaDB [db_d7dev.octaviadata.com]> \q