function Cache::isEnabled
Return value
bool
11 calls to Cache::isEnabled()
- Cache::clear in vendor/
composer/ composer/ src/ Composer/ Cache.php - Cache::copyFrom in vendor/
composer/ composer/ src/ Composer/ Cache.php - Copy a file into the cache
- Cache::copyTo in vendor/
composer/ composer/ src/ Composer/ Cache.php - Copy a file out of the cache
- Cache::gc in vendor/
composer/ composer/ src/ Composer/ Cache.php - Cache::gcVcsCache in vendor/
composer/ composer/ src/ Composer/ Cache.php
File
-
vendor/
composer/ composer/ src/ Composer/ Cache.php, line 90
Class
- Cache
- Reads/writes to a filesystem cache
Namespace
ComposerCode
public function isEnabled() {
if ($this->enabled === null) {
$this->enabled = true;
if (!$this->readOnly && (!is_dir($this->root) && !Silencer::call('mkdir', $this->root, 0777, true) || !is_writable($this->root))) {
$this->io
->writeError('<warning>Cannot create cache directory ' . $this->root . ', or directory is not writable. Proceeding without cache. See also cache-read-only config if your filesystem is read-only.</warning>');
$this->enabled = false;
}
}
return $this->enabled;
}