public function CacheArray::__construct

Constructs a CacheArray object.

Parameters

string $cid: The cid for the array being cached.

string $bin: The bin to cache the array.

array $tags: (optional) The tags to specify for the cache item.

2 calls to CacheArray::__construct()
LocaleLookup::__construct in drupal/core/modules/locale/lib/Drupal/locale/LocaleLookup.php
Constructs a LocaleCache object.
SchemaCache::__construct in drupal/core/lib/Drupal/Core/Utility/SchemaCache.php
Constructs a SchemaCache object.
3 methods override CacheArray::__construct()
LocaleLookup::__construct in drupal/core/modules/locale/lib/Drupal/locale/LocaleLookup.php
Constructs a LocaleCache object.
SchemaCache::__construct in drupal/core/lib/Drupal/Core/Utility/SchemaCache.php
Constructs a SchemaCache object.
ThemeRegistry::__construct in drupal/core/lib/Drupal/Core/Utility/ThemeRegistry.php
Constructs a ThemeRegistry object.

File

drupal/core/lib/Drupal/Core/Utility/CacheArray.php, line 114
Definition of CacheArray

Class

CacheArray
Provides a caching wrapper to be used in place of large array structures.

Namespace

Drupal\Core\Utility

Code

public function __construct($cid, $bin, $tags = array()) {
  $this->cid = $cid;
  $this->bin = $bin;
  $this->tags = $tags;
  if ($cached = cache($bin)
    ->get($this->cid)) {
    $this->storage = $cached->data;
  }
}