added language context to json cache to articles and collection
This commit is contained in:
@@ -342,7 +342,10 @@ class CorpusController extends ControllerBase {
|
|||||||
|
|
||||||
$data['#cache'] = [
|
$data['#cache'] = [
|
||||||
'max-age' => \Drupal\Core\Cache\Cache::PERMANENT,
|
'max-age' => \Drupal\Core\Cache\Cache::PERMANENT,
|
||||||
'tags' => ['edlp-articlesindex-cache']
|
'tags' => ['edlp-articlesindex-cache'],
|
||||||
|
'contexts' => [
|
||||||
|
'languages:language_content'
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
// $response = new JsonResponse();
|
// $response = new JsonResponse();
|
||||||
@@ -435,7 +438,10 @@ class CorpusController extends ControllerBase {
|
|||||||
|
|
||||||
$data['#cache'] = [
|
$data['#cache'] = [
|
||||||
'max-age' => \Drupal\Core\Cache\Cache::PERMANENT,
|
'max-age' => \Drupal\Core\Cache\Cache::PERMANENT,
|
||||||
'tags' => ['edlp-articlesindex-cache']
|
'tags' => ['edlp-articlesindex-cache'],
|
||||||
|
'contexts' => [
|
||||||
|
'languages:language_content'
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
// $response = new JsonResponse();
|
// $response = new JsonResponse();
|
||||||
|
|||||||
Reference in New Issue
Block a user