1.20.x bootstrap.inc public BackdropCacheArray::__construct($cid, $bin)

Constructs a BackdropCacheArray object.

Parameters

$cid: The cid for the array being cached.

$bin: The bin to cache the array.

File

includes/bootstrap.inc, line 364
Functions that need to be loaded on every Backdrop request.

Class

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

Code

public function __construct($cid, $bin) {
  $this->cid = $cid;
  $this->bin = $bin;

  if ($cached = cache($bin)->get($this->cid)) {
    $this->storage = $cached->data;
  }
}