Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. return array(
  2. '#theme' => 'testing_block',
  3. '#testBlockData' => $testBlockData,
  4. '#cache' => array(
  5. 'contexts' => array('url.path'),
  6. ),
  7. );
  8.  
  9. return array(
  10. '#theme' => 'testing_block',
  11. '#testBlockData' => $testBlockData,
  12. '#cache' => array(
  13. 'max-age' => 0,
  14. ),
  15. );
  16.  
  17. return array(
  18. '#theme' => 'testing_block',
  19. '#testBlockData' => $testBlockData,
  20. '#cache' => array(
  21. 'contexts' => array('url.path'),
  22. 'max-age' => 0,
  23. ),
  24. );
  25.  
  26. Drupal::service('page_cache_kill_switch')->trigger();
  27.  
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function getCacheMaxAge() {
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement