Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $build = [
- '#cache' => [
- 'tags'=>['node'], // Invalidate cache whenever a new node is created/modified/deleted
- 'contexts'=>['url'] // Invalidate cache per url
- ]
- ];
- global $selected_city;
- '#cache' => [
- 'keys'=>['home_slider_'.$selected_city],
- 'tags'=>['node'],
- 'contexts'=>['url']
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement