comparison core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.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
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
5 /** 5 /**
6 * Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. 6 * Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface.
7 */ 7 */
8 trait RefinableCacheableDependencyTrait { 8 trait RefinableCacheableDependencyTrait {
9 9
10 /** 10 use CacheableDependencyTrait;
11 * Cache contexts.
12 *
13 * @var string[]
14 */
15 protected $cacheContexts = [];
16
17 /**
18 * Cache tags.
19 *
20 * @var string[]
21 */
22 protected $cacheTags = [];
23
24 /**
25 * Cache max-age.
26 *
27 * @var int
28 */
29 protected $cacheMaxAge = Cache::PERMANENT;
30
31 /**
32 * {@inheritdoc}
33 */
34 public function getCacheTags() {
35 return $this->cacheTags;
36 }
37
38 /**
39 * {@inheritdoc}
40 */
41 public function getCacheContexts() {
42 return $this->cacheContexts;
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 public function getCacheMaxAge() {
49 return $this->cacheMaxAge;
50 }
51 11
52 /** 12 /**
53 * {@inheritdoc} 13 * {@inheritdoc}
54 */ 14 */
55 public function addCacheableDependency($other_object) { 15 public function addCacheableDependency($other_object) {