comparison core/lib/Drupal/Core/Cache/PhpBackend.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php 1 <?php
2 2
3 namespace Drupal\Core\Cache; 3 namespace Drupal\Core\Cache;
4 4
5 use Drupal\Component\Assertion\Inspector;
5 use Drupal\Core\PhpStorage\PhpStorageFactory; 6 use Drupal\Core\PhpStorage\PhpStorageFactory;
6 use Drupal\Component\Utility\Crypt; 7 use Drupal\Component\Utility\Crypt;
7 8
8 /** 9 /**
9 * Defines a PHP cache implementation. 10 * Defines a PHP cache implementation.
141 142
142 /** 143 /**
143 * {@inheritdoc} 144 * {@inheritdoc}
144 */ 145 */
145 public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = []) { 146 public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = []) {
146 assert('\Drupal\Component\Assertion\Inspector::assertAllStrings($tags)', 'Cache Tags must be strings.'); 147 assert(Inspector::assertAllStrings($tags), 'Cache Tags must be strings.');
148
147 $item = (object) [ 149 $item = (object) [
148 'cid' => $cid, 150 'cid' => $cid,
149 'data' => $data, 151 'data' => $data,
150 'created' => round(microtime(TRUE), 3), 152 'created' => round(microtime(TRUE), 3),
151 'expire' => $expire, 153 'expire' => $expire,