src/GraphQL/Execution/QueryProcessor.php 1 location
|
@@ 195-201 (lines=7) @@
|
192 |
|
* |
193 |
|
* @see \Drupal\Core\Cache\CacheBackendInterface::set() |
194 |
|
*/ |
195 |
|
protected function maxAgeToExpire($maxAge) { |
196 |
|
if ($maxAge === Cache::PERMANENT) { |
197 |
|
return Cache::PERMANENT; |
198 |
|
} |
199 |
|
|
200 |
|
return (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME') + $maxAge; |
201 |
|
} |
202 |
|
|
203 |
|
/** |
204 |
|
* Generates a cache identifier for the passed cache contexts. |
src/GraphQL/Schema/SchemaLoader.php 1 location
|
@@ 240-246 (lines=7) @@
|
237 |
|
* |
238 |
|
* @see \Drupal\Core\Cache\CacheBackendInterface::set() |
239 |
|
*/ |
240 |
|
protected function maxAgeToExpire($maxAge) { |
241 |
|
if ($maxAge === Cache::PERMANENT) { |
242 |
|
return Cache::PERMANENT; |
243 |
|
} |
244 |
|
|
245 |
|
return (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME') + $maxAge; |
246 |
|
} |
247 |
|
|
248 |
|
/** |
249 |
|
* Generates a cache identifier for the passed cache contexts. |