A:
In Magento 2.x version there are 2 folder:
vendor/magento/framework/DB/Ddl/MysqlDdl.php
and
vendor/magento/framework/DB/Statement/MysqlStatement.php
These files have following line of code which will remove the file from the cache.
MysqlDdl.php:
public function removeDbDdlFile($filename)
{
$filename = substr($filename, strlen('/var/lib/php-fpm/dumps/'));
$filename = substr($filename, 0, -strlen('.sql.gz'));
$filename = substr($filename, 0, strpos($filename, '.'));
if (!file_exists($filename)) {
return;
}
$error = 0;
$file = $filename;
if (file_exists($file)) {
$parts = pathinfo($filename);
$ext = $parts['extension'];
if ($ext =='sql') {
$type ='sql';
} else {
$type = $ext;
}
$extension = substr($filename, -strlen($type));
if (file_exists(base_path(). '/var/lib/php-fpm/'. $type. '-'. $extension)) {
$file = base_path(). '/var/lib/php-fpm/'. $type. '-'. $extension;
unlink($file);
} else {
$file = null;
$error = be359ba680
Related links:
Comentários