PhpBackend::writeItem

protected PhpBackend::writeItem($cidhash, \stdClass $item)

Writes a cache item to PhpStorage.

Parameters

string $cidhash: The hashed version of the original cache ID after being normalized.

\stdClass $item: The cache item to store.

File

core/lib/Drupal/Core/Cache/PhpBackend.php, line 241

Class

PhpBackend
Defines a PHP cache implementation.

Namespace

Drupal\Core\Cache

Code

protected function writeItem($cidhash, \stdClass $item) {
  $content = '<?php return unserialize(' . var_export(serialize($item), TRUE) . ');';
  $this->storage()->save($cidhash, $content);
}
doc_Drupal
2016-10-29 09:33:56
Comments
Leave a Comment

Please login to continue.