public function S3fsCommands::refreshCache in S3 File System 8.3
Same name and namespace in other branches
- 4.0.x src/Commands/S3fsCommands.php \Drupal\s3fs\Commands\S3fsCommands::refreshCache()
Refresh the S3 File System metadata cache.
@command s3fs:refresh-cache @aliases s3fs-rc, s3fs-refresh-cache
File
- src/
Commands/ S3fsCommands.php, line 80
Class
- S3fsCommands
- S3FS Drush commands handler.
Namespace
Drupal\s3fs\CommandsCode
public function refreshCache() {
$config = $this->s3fsConfig
->get();
if ($errors = $this->s3fs
->validate($config)) {
foreach ($errors as $error) {
$this
->logger()
->error($error);
}
throw new \Exception(new TranslatableMarkup('Unable to validate your s3fs configuration settings. Please configure S3 File System from the admin/config/media/s3fs page and try again.'));
}
$this->s3fsRefreshCacheBatch
->execute($config);
}