Update to Drupal 8.1.5. For more information, see https://www.drupal.org/project/drupal/releases/8.1.5
This commit is contained in:
parent
13b6ca7cc2
commit
38ba7c357d
342 changed files with 7814 additions and 1534 deletions
|
@ -149,7 +149,7 @@ class Cache {
|
|||
* Gets all cache bin services.
|
||||
*
|
||||
* @return array
|
||||
* An array of cache backend objects keyed by cache bins.
|
||||
* An array of cache backend objects keyed by cache bins.
|
||||
*/
|
||||
public static function getBins() {
|
||||
$bins = array();
|
||||
|
|
|
@ -37,7 +37,7 @@ interface CacheableDependencyInterface {
|
|||
* When this object is modified, these cache tags will be invalidated.
|
||||
*
|
||||
* @return string[]
|
||||
* A set of cache tags.
|
||||
* A set of cache tags.
|
||||
*/
|
||||
public function getCacheTags();
|
||||
|
||||
|
|
|
@ -87,8 +87,16 @@ class ChainedFastBackend implements CacheBackendInterface, CacheTagsInvalidatorI
|
|||
* The fast cache backend.
|
||||
* @param string $bin
|
||||
* The cache bin for which the object is created.
|
||||
*
|
||||
* @throws \Exception
|
||||
* When the consistent cache backend and the fast cache backend are the same
|
||||
* service.
|
||||
*/
|
||||
public function __construct(CacheBackendInterface $consistent_backend, CacheBackendInterface $fast_backend, $bin) {
|
||||
if ($consistent_backend == $fast_backend) {
|
||||
// @todo: should throw a proper exception. See https://www.drupal.org/node/2751847.
|
||||
trigger_error('Consistent cache backend and fast cache backend cannot use the same service.', E_USER_ERROR);
|
||||
}
|
||||
$this->consistentBackend = $consistent_backend;
|
||||
$this->fastBackend = $fast_backend;
|
||||
$this->bin = 'cache_' . $bin;
|
||||
|
|
|
@ -25,20 +25,22 @@ class QueryArgsCacheContext extends RequestStackCacheContextBase implements Calc
|
|||
*/
|
||||
public function getContext($query_arg = NULL) {
|
||||
if ($query_arg === NULL) {
|
||||
return $this->requestStack->getCurrentRequest()->getQueryString();
|
||||
// All arguments requested. Use normalized query string to minimize
|
||||
// variations.
|
||||
$value = $this->requestStack->getCurrentRequest()->getQueryString();
|
||||
return ($value !== NULL) ? $value : '';
|
||||
}
|
||||
elseif ($this->requestStack->getCurrentRequest()->query->has($query_arg)) {
|
||||
$value = $this->requestStack->getCurrentRequest()->query->get($query_arg);
|
||||
if ($value !== '') {
|
||||
if (is_array($value)) {
|
||||
return http_build_query($value);
|
||||
}
|
||||
elseif ($value !== '') {
|
||||
return $value;
|
||||
}
|
||||
else {
|
||||
return '?valueless?';
|
||||
}
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
return '?valueless?';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue