Question
How to Disable page cache for specific page on Drupal 9 and Drupal 8 ?
Syntax:
\Drupal::service('page_cache_kill_switch')->trigger();
Example on a controller:
public function testPage() {
\Drupal::service('page_cache_kill_switch')->trigger();
return [
'#markup' => time(),
];
}
Comments
assignment help
If you cannot cope with writing an essay, then assignment help can come to your aid at the link https://custom-writing.co.uk/assignment. Experts will be able to solve any problem for you and will provide you with only the best paper.
Add new comment