VarnishBackend.php in Varnish 8
File
src/Cache/VarnishBackend.php
View source
<?php
namespace Drupal\varnish\Cache;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\CacheBackendInterface;
class VarnishBackend implements CacheBackendInterface {
protected $bin;
protected $pathAliasManager;
function __construct($bin, $pathAliasManager) {
$this->bin = $bin;
$this->pathAliasManager = $pathAliasManager;
}
public function get($cid, $allow_invalid = FALSE) {
return FALSE;
}
public function getMultiple(&$cids, $allow_invalid = FALSE) {
return [];
}
public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = []) {
}
public function setMultiple(array $items) {
}
public function delete($cid) {
$this
->deleteMultiple([
$cid,
]);
}
public function deleteMultiple(array $cids) {
$test = 'test';
}
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) {
if (isset($deleted_tags[$tag])) {
continue;
}
$deleted_tags[$tag] = TRUE;
unset($tag_cache[$tag]);
}
}
public function deleteAll() {
$test = 'test';
}
public function invalidate($cid) {
$this
->invalidateMultiple([
$cid,
]);
}
public function invalidateMultiple(array $cids) {
$test = 'test';
}
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) {
if (isset($invalidated_tags[$tag])) {
continue;
}
$invalidated_tags[$tag] = TRUE;
unset($tag_cache[$tag]);
}
}
public function invalidateAll() {
$test = 'test';
}
public function garbageCollection() {
}
public function removeBin() {
}
}