It is usually not possible to clear the Drupal cache via the site administration or via the command:
drush cache-rebuild
In this case the only way available is to clear the cache via the database with the command
TRUNCATE
The question now is which tables should be flushed and which ones are cached?
All Drupal cache tables, whether kernel tables or module tables, start with the prefix "cache".
To directly flush all cache tables, use the following SQL commands, specifying the database name:
SET @DB_NAME ='my_databse_name';
SELECT concat('TRUNCATE TABLE ', TABLE_NAME, ';') FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = @DB_NAME AND TABLE_NAME LIKE '%cache%'
Then execute the resulting commands to unpack, making sure that you have selected the appropriate database for execution.