comparison core/lib/Drupal/Core/Cache/ApcuBackend.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
5 use Drupal\Component\Assertion\Inspector;
4 6
5 /** 7 /**
6 * Stores cache items in the Alternative PHP Cache User Cache (APCu). 8 * Stores cache items in the Alternative PHP Cache User Cache (APCu).
7 */ 9 */
8 class ApcuBackend implements CacheBackendInterface { 10 class ApcuBackend implements CacheBackendInterface {
159 161
160 /** 162 /**
161 * {@inheritdoc} 163 * {@inheritdoc}
162 */ 164 */
163 public function set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []) { 165 public function set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []) {
164 assert('\Drupal\Component\Assertion\Inspector::assertAllStrings($tags)', 'Cache tags must be strings.'); 166 assert(Inspector::assertAllStrings($tags), 'Cache tags must be strings.');
165 $tags = array_unique($tags); 167 $tags = array_unique($tags);
166 $cache = new \stdClass(); 168 $cache = new \stdClass();
167 $cache->cid = $cid; 169 $cache->cid = $cid;
168 $cache->created = round(microtime(TRUE), 3); 170 $cache->created = round(microtime(TRUE), 3);
169 $cache->expire = $expire; 171 $cache->expire = $expire;