Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Cache/CacheableDependencyInterface.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 * Defines an interface for objects which may be used by other cached objects. | |
7 * | |
8 * All cacheability metadata exposed in this interface is bubbled to parent | |
9 * objects when they are cached: if a child object needs to be varied by certain | |
10 * cache contexts, invalidated by certain cache tags, expire after a certain | |
11 * maximum age, then so should any parent object. | |
12 * | |
13 * @ingroup cache | |
14 */ | |
15 interface CacheableDependencyInterface { | |
16 | |
17 /** | |
18 * The cache contexts associated with this object. | |
19 * | |
20 * These identify a specific variation/representation of the object. | |
21 * | |
22 * Cache contexts are tokens: placeholders that are converted to cache keys by | |
23 * the @cache_contexts_manager service. The replacement value depends on the | |
24 * request context (the current URL, language, and so on). They're converted | |
25 * before storing an object in cache. | |
26 * | |
27 * @return string[] | |
28 * An array of cache context tokens, used to generate a cache ID. | |
29 * | |
30 * @see \Drupal\Core\Cache\Context\CacheContextsManager::convertTokensToKeys() | |
31 */ | |
32 public function getCacheContexts(); | |
33 | |
34 /** | |
35 * The cache tags associated with this object. | |
36 * | |
37 * When this object is modified, these cache tags will be invalidated. | |
38 * | |
39 * @return string[] | |
40 * A set of cache tags. | |
41 */ | |
42 public function getCacheTags(); | |
43 | |
44 /** | |
45 * The maximum age for which this object may be cached. | |
46 * | |
47 * @return int | |
48 * The maximum time in seconds that this object may be cached. | |
49 */ | |
50 public function getCacheMaxAge(); | |
51 | |
52 } |