Drupal 9/10: Cache Contexts and Cache Tags | Create your own cache context and tags

Описание к видео Drupal 9/10: Cache Contexts and Cache Tags | Create your own cache context and tags

In this video, I'm covering Drupal Cache Contexts and Cache Tags. We're going to see how to use cache contexts, how to create custom cache contexts, how to use cache tags, how to invalidate cache tags, and how to use a custom cache tag.

To demonstrate this, I have the following setup:
Drupal 10.0.3
PHP 8.1
Have a custom block defined in a custom module called potato_cache

Chapters:
00:00 Introduction to cache contexts
01:04 Creating your own cache context
04:43 Using cache contexts in a custom block
06:18 Conclusion about cache contexts
06:34 Looking at the block render array using dump
07:20 Using cache contexts in render arrays
08:24 Introduction to cache tags
08:58 Using existing cache tags in a custom block
10:34 Using cache tags in render arrays
11:35 Custom cache tag example
12:03 Invalidating cache tags with drush
12:58 Invalidating cache tags with PHP

If you have any other Drupal questions, feel free to comment them below and I might make video(s) about them.

#drupal10
#drupal9
#drupal
#drupalyt
#webdevelopment

Комментарии

Информация по комментариям в разработке