class VarnishBackend in Varnish 8
Hierarchy
- class \Drupal\varnish\Cache\VarnishBackend implements CacheBackendInterface
Expanded class hierarchy of VarnishBackend
File
- src/
Cache/ VarnishBackend.php, line 9
Namespace
Drupal\varnish\CacheView source
class VarnishBackend implements CacheBackendInterface {
protected $bin;
protected $pathAliasManager;
/**
* Constructs a VarnishBackend object.
*
* @param string $bin
* The cache bin for which the object is created.
*/
function __construct($bin, $pathAliasManager) {
$this->bin = $bin;
$this->pathAliasManager = $pathAliasManager;
}
/**
* {@inheritdoc}
*/
public function get($cid, $allow_invalid = FALSE) {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function getMultiple(&$cids, $allow_invalid = FALSE) {
return [];
}
/**
* {@inheritdoc}
*/
public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = []) {
}
/**
* {@inheritdoc}
*/
public function setMultiple(array $items) {
}
/**
* {@inheritdoc}
*/
public function delete($cid) {
$this
->deleteMultiple([
$cid,
]);
}
/**
* {@inheritdoc}
*/
public function deleteMultiple(array $cids) {
$test = 'test';
}
/**
* {@inheritdoc}
*/
public function deleteTags(array $tags) {
$tag_cache =& drupal_static('Drupal\\Core\\Cache\\CacheBackendInterface::tagCache', []);
$deleted_tags =& drupal_static('Drupal\\Core\\Cache\\DatabaseBackend::deletedTags', []);
foreach ($tags as $tag) {
// Only delete tags once per request unless they are written again.
if (isset($deleted_tags[$tag])) {
continue;
}
$deleted_tags[$tag] = TRUE;
unset($tag_cache[$tag]);
}
}
/**
* {@inheritdoc}
*/
public function deleteAll() {
$test = 'test';
}
/**
* {@inheritdoc}
*/
public function invalidate($cid) {
$this
->invalidateMultiple([
$cid,
]);
}
/**
* {@inheritdoc}
*/
public function invalidateMultiple(array $cids) {
$test = 'test';
}
/**
* {@inheritdoc}
*/
public function invalidateTags(array $tags) {
$tag_cache =& drupal_static('Drupal\\Core\\Cache\\CacheBackendInterface::tagCache', []);
$invalidated_tags =& drupal_static('Drupal\\Core\\Cache\\DatabaseBackend::invalidatedTags', []);
foreach ($tags as $tag) {
// Only invalidate tags once per request unless they are written again.
if (isset($invalidated_tags[$tag])) {
continue;
}
$invalidated_tags[$tag] = TRUE;
unset($tag_cache[$tag]);
}
}
/**
* {@inheritdoc}
*/
public function invalidateAll() {
$test = 'test';
}
/**
* {@inheritdoc}
*/
public function garbageCollection() {
}
/**
* {@inheritdoc}
*/
public function removeBin() {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheBackendInterface:: |
constant | Indicates that the item should never be removed unless explicitly deleted. | ||
VarnishBackend:: |
protected | property | ||
VarnishBackend:: |
protected | property | ||
VarnishBackend:: |
public | function |
Deletes an item from the cache. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Deletes all cache items in a bin. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Deletes multiple items from the cache. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function | ||
VarnishBackend:: |
public | function |
Performs garbage collection on a cache bin. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Returns data from the persistent cache. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Returns data from the persistent cache when given an array of cache IDs. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Marks a cache item as invalid. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Marks all cache items as invalid. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Marks cache items as invalid. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function | ||
VarnishBackend:: |
public | function |
Remove a cache bin. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Stores data in the persistent cache. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
public | function |
Store multiple items in the persistent cache. Overrides CacheBackendInterface:: |
|
VarnishBackend:: |
function | Constructs a VarnishBackend object. |