Skip to content

Commit

Permalink
Flush versionCheck cache when upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Apr 27, 2018
1 parent b27513d commit 2c43763
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Upgrade/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,9 @@ public static function doFinish() {
$config = CRM_Core_Config::singleton();
$config->cleanupCaches(1);

$versionCheck = new CRM_Utils_VersionCheck();
$versionCheck->flushCache();

// Rebuild all triggers and re-enable logging if needed
$logging = new CRM_Logging_Schema();
$logging->fixSchemaDifferences();
Expand Down
7 changes: 7 additions & 0 deletions CRM/Utils/VersionCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ private function writeCacheFile($contents) {
}
}

/**
* Removes cached version info.
*/
public function flushCache() {
unlink($this->cacheFile);
}

/**
* Lookup version_check scheduled job
*/
Expand Down

0 comments on commit 2c43763

Please sign in to comment.