Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Cache; | |
4 | |
5 /** | |
6 * Trait to implement CacheableDependencyInterface for unchanging objects. | |
7 * | |
8 * @see \Drupal\Core\Cache\CacheableDependencyInterface | |
9 */ | |
10 trait UnchangingCacheableDependencyTrait { | |
11 | |
12 /** | |
13 * {@inheritdoc} | |
14 */ | |
15 public function getCacheContexts() { | |
16 return []; | |
17 } | |
18 | |
19 /** | |
20 * {@inheritdoc} | |
21 */ | |
22 public function getCacheTags() { | |
23 return []; | |
24 } | |
25 | |
26 /** | |
27 * {@inheritdoc} | |
28 */ | |
29 public function getCacheMaxAge() { | |
30 return Cache::PERMANENT; | |
31 } | |
32 | |
33 } |