I need to disable the cache for a specific page, or get the cache to ignore query params. I have tried this, but it does not disable the cache for me https://www.drupal.org/project/page_cache_query_ignore
After trying multiple ways to disable the cache for a specific page or even the whole site I have nothing that works.
I have tried all of these in settings.php
$settings['cache']['default'] = 'cache.backend.null';
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
$settings['cache']['bins']['page'] = 'cache.backend.null';
$settings['cache']['bins']['entity'] = 'cache.backend.null';
There is also talk of using \Drupal::service('page_cache_kill_switch')->trigger();
but I am unsure where to place this to disable the cache for a regular page.
This is for the search page, that uses query params for the search query. Drupal 8 is caching the page so each visit to the search after the first search always shows the results for the first search.
The header for Drupal dynamic cache is always a HIT
X-Drupal-Dynamic-Cache: HIT
url.query_args
cache context somewhere, but will need more info to tell you where. – sonfd Aug 12 '20 at 11:43