- Issue created by @catch
- π¬π§United Kingdom catch
Actually it'd be fine if it always adds this, as long as it's one or the other, so re-titling for a more agnostic solution.
- π¬π§United Kingdom catch
I think this actually comes from:
/** * {@inheritdoc} */ public function getCacheContexts() { $contexts = []; if (($views_data = Views::viewsData()->get($this->view->storage->get('base_table'))) && !empty($views_data['table']['entity type'])) { $entity_type_id = $views_data['table']['entity type']; $entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id); $contexts = $entity_type->getListCacheContexts(); } return $contexts; }
In QueryPluginBase.
Still don't know why it's different on different requests yet.
- π¬π§United Kingdom catch
One possible issue here is that node_query_node_access_alter() only adds the user.node_grants_$op cache context when hook_node_grants() is implemented, but Node adds the cache context unconditionally as a list cache context. So something things would get no node_grants cache context, and others would get it with the value being 'all' - which is effectively the same thing but could cause cache redirects and etc.
Even if it's not the cause of what I'm seeing, it still looks incorrect.
- πΊπΈUnited States dww
Is this a bug, not a task? Sounds like it to me, but I haven't actually looked into it yet.
- π¬π§United Kingdom catch
Yes that makes sense. I haven't found the time to investigate this further than I got before still.