public function ReleaseInfo::clearCached

8.0.x ReleaseInfo.php public ReleaseInfo::clearCached(array $request)
7.x ReleaseInfo.php public ReleaseInfo::clearCached(array $request)
master ReleaseInfo.php public ReleaseInfo::clearCached(array $request)

Delete cached update service file of a project.

Parameters

array $request: A request array.

File

lib/Drush/UpdateService/ReleaseInfo.php, line 79
Drush release info engine for update.drupal.org and compatible services.

Namespace

Drush\UpdateService

Class

ReleaseInfo
Release info engine class.

Code

public function clearCached(array $request) {
  if (isset($this->cache[$request['name']])) {
    unset($this->cache[$request['name']]);
  }
  $url = Project::buildFetchUrl($request);
  $cache_file = drush_download_file_name($url);
  if (file_exists($cache_file)) {
    unlink($cache_file);
  }
}