Skip to content

Commit

Permalink
Cleanup of all kind of cache handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Quetzacoalt91 committed May 7, 2019
1 parent 5a31334 commit 3d00b83
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 24 deletions.
2 changes: 0 additions & 2 deletions classes/TaskRunner/Upgrade/UpgradeDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public function run()
$this->next = 'upgradeModules';
$this->logger->info($this->translator->trans('Database upgraded. Now upgrading your Addons modules...', array(), 'Modules.Autoupgrade.Admin'));

$this->container->getSymfonyAdapter()->clearMigrationCache();

return true;
}

Expand Down
2 changes: 0 additions & 2 deletions classes/TaskRunner/Upgrade/UpgradeFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public function run()
if (count($filesToUpgrade) > 0) {
$this->logger->info($this->translator->trans('%s files left to upgrade.', array(count($filesToUpgrade)), 'Modules.Autoupgrade.Admin'));
$this->stepDone = false;
@unlink(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'dev' . DIRECTORY_SEPARATOR . 'class_index.php');
@unlink(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'prod' . DIRECTORY_SEPARATOR . 'class_index.php');
}

return true;
Expand Down
1 change: 0 additions & 1 deletion classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ protected function initConstants()
}*/

// Container may be needed to run upgrade scripts
$this->cleanFolders();
$this->container->getSymfonyAdapter()->initAppKernel();
}

Expand Down
19 changes: 0 additions & 19 deletions classes/UpgradeTools/SymfonyAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,6 @@ public function __construct($destinationPsVersion)
$this->destinationPsVersion = $destinationPsVersion;
}

/**
* Can be called only on PS 1.7.
*/
public function clearMigrationCache()
{
if (version_compare($this->destinationPsVersion, '1.7.0.0', '<')) {
return;
}

\Tools::clearCache();
\Tools::clearXMLCache();
\Media::clearCache();
\Tools::generateIndex();

$sf2Refresh = new \PrestaShopBundle\Service\Cache\Refresh();
$sf2Refresh->addCacheClear();
$sf2Refresh->execute();
}

public function runSchemaUpgradeCommand()
{
if (version_compare($this->destinationPsVersion, '1.7.1.1', '>=')) {
Expand Down

0 comments on commit 3d00b83

Please sign in to comment.