public function CacheCollector::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Cache/CacheCollector.php \Drupal\Core\Cache\CacheCollector::__construct()
- 9 core/lib/Drupal/Core/Cache/CacheCollector.php \Drupal\Core\Cache\CacheCollector::__construct()
Constructs a CacheCollector object.
Parameters
string $cid: The cid for the array being cached.
\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.
\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.
array $tags: (optional) The tags to specify for the cache item.
4 calls to CacheCollector::__construct()
- AliasWhitelist::__construct in core/
modules/ path_alias/ src/ AliasWhitelist.php - Constructs an AliasWhitelist object.
- BlockContentUuidLookup::__construct in core/
modules/ block_content/ src/ BlockContentUuidLookup.php - Constructs a BlockContentUuidLookup instance.
- LibraryDiscoveryCollector::__construct in core/
lib/ Drupal/ Core/ Asset/ LibraryDiscoveryCollector.php - Constructs a CacheCollector object.
- MenuActiveTrail::__construct in core/
lib/ Drupal/ Core/ Menu/ MenuActiveTrail.php - Constructs a \Drupal\Core\Menu\MenuActiveTrail object.
6 methods override CacheCollector::__construct()
- AliasWhitelist::__construct in core/
modules/ path_alias/ src/ AliasWhitelist.php - Constructs an AliasWhitelist object.
- BlockContentUuidLookup::__construct in core/
modules/ block_content/ src/ BlockContentUuidLookup.php - Constructs a BlockContentUuidLookup instance.
- LibraryDiscoveryCollector::__construct in core/
lib/ Drupal/ Core/ Asset/ LibraryDiscoveryCollector.php - Constructs a CacheCollector object.
- LocaleLookup::__construct in core/
modules/ locale/ src/ LocaleLookup.php - Constructs a LocaleLookup object.
- MenuActiveTrail::__construct in core/
lib/ Drupal/ Core/ Menu/ MenuActiveTrail.php - Constructs a \Drupal\Core\Menu\MenuActiveTrail object.
File
- core/
lib/ Drupal/ Core/ Cache/ CacheCollector.php, line 114
Class
- CacheCollector
- Default implementation for CacheCollectorInterface.
Namespace
Drupal\Core\CacheCode
public function __construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, array $tags = []) {
assert(Inspector::assertAllStrings($tags), 'Cache tags must be strings.');
$this->cid = $cid;
$this->cache = $cache;
$this->tags = $tags;
$this->lock = $lock;
}