class BoostCacheHandler in Boost 8
BoostCacheHandler class.
Hierarchy
- class \Drupal\boost\BoostCacheHandler
Expanded class hierarchy of BoostCacheHandler
1 file declares its use of BoostCacheHandler
- BoostCache.php in src/
BoostCache.php - Contains Drupal\boost\BoostCache
File
- src/
BoostCacheHandler.php, line 15 - Contains Drupal\boost\BoostCacheHandler.
Namespace
Drupal\boostView source
class BoostCacheHandler {
/**
* @var \Drupal\boost\BoostCacheFile
*/
protected $file;
/**
* Constructs a new BoostCacheHandler.
*/
public function __construct() {
$this->file = new BoostCacheFile(\Drupal::service('file_system'));
}
/**
* Load a file by uri.
* @param string $uri
*/
public function getCache($uri) {
return $this->file
->load($uri);
}
/**
* Delete cache file.
* @param string $path
*/
public function deleteCache($uri) {
return $this->file
->delete($uri);
}
/**
* Save boost cache file.
*/
public function setCache($uri, $content) {
$this->file
->save($uri, $content);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BoostCacheHandler:: |
protected | property | ||
BoostCacheHandler:: |
public | function | Delete cache file. | |
BoostCacheHandler:: |
public | function | Load a file by uri. | |
BoostCacheHandler:: |
public | function | Save boost cache file. | |
BoostCacheHandler:: |
public | function | Constructs a new BoostCacheHandler. |