In this presentation we introduce Drupal 8's Cache API, review its metadata settings and demonstrate D8's caching flexibility using a fun, real-life example. The fun part is in the form of tacos because they're the de facto currency of the HeyTaco! Slack integration, from which we will grab our cacheable data. The idea is to discuss the Cache API and give a practical example of Drupal 8 caching in action. Since this presentation is geared for beginners, there's added value for the audience in seeing the many moving parts that are used along the way!
- Explain D8 Cache metadata settings
- Demonstrate how we can cache results differently for different users
- Stress the importance of using render arrays
- Build a custom module to create the custom block to be cached
- Grab data from a 3rd party API
- Use Twig to display the custom block's output
This presentation makes no assumptions and begins with the question "Why cache at all?" From that modest beginning we progress through all the above points and finally reach our Cache-tastic conclusion. The title is about caching and tacos, but the presentation is about so much more!