DrupalCon Dublin 2016: Practical Caching in Drupal 8
There were some excellent talks about cacheability and powerful caching in Drupal 8, but when it comes to practice, there are always unknowns how things are organized and why they don't work as you expect. Practical Caching in Drupal 8 session will cover the practical part of Caching in Drupal 8.
I'll be covering 3 layers of caching in Drupal 8:
Anonymous page cache (Internal Page Cache)
By default Drupal uses Internal Page Cache module to store anonymous user's page cache in database. We will cover where this is useful and how we can tweak the anonymous cache to work for us. How to disable caching for a new page, for existing pages, conditionally. How to disallow a page URL to be retrieved from page cache and force a refresh (RequestPolicy and ResponsePolicy)
Reverse proxy caching
Most of us try to benefit from reverse proxy caching as much as possible. We will cover how to configure reverse proxy caching with Varnish or any CDN and what to keep in mind when doing it
Authenticated page cache (Dynamic Page Cache)
Probably the biggest concern for Drupal 7 (and prior) developers was, how do we effectively store authenticated user's cache and how to we keep it up to date, personal and secure at the same time.
We will cover extensively caching metadata and ways to achieve any caching strategy by leveraging cache contexts, cache tags, max-age, keys, bubbling, lazy builders, autoplaceholdering and Javascript solutions (ex. contextual links).
Finally the practical part will cover some of the most common mistakes people do when working with render arrays and when building their own controllers regarding caching. We'll cover Drupal caching default settings for autoplaceholdering, defaults non-cacheable contexts/tags and ways to effectively configure your caching strategy from settings.yml or disable caching for local development.
Takeaway
After this session you should be able to effectively debug caching issues and boost your site cacheability to the limits.
I'll be covering 3 layers of caching in Drupal 8:
Anonymous page cache (Internal Page Cache)
By default Drupal uses Internal Page Cache module to store anonymous user's page cache in database. We will cover where this is useful and how we can tweak the anonymous cache to work for us. How to disable caching for a new page, for existing pages, conditionally. How to disallow a page URL to be retrieved from page cache and force a refresh (RequestPolicy and ResponsePolicy)
Reverse proxy caching
Most of us try to benefit from reverse proxy caching as much as possible. We will cover how to configure reverse proxy caching with Varnish or any CDN and what to keep in mind when doing it
Authenticated page cache (Dynamic Page Cache)
Probably the biggest concern for Drupal 7 (and prior) developers was, how do we effectively store authenticated user's cache and how to we keep it up to date, personal and secure at the same time.
We will cover extensively caching metadata and ways to achieve any caching strategy by leveraging cache contexts, cache tags, max-age, keys, bubbling, lazy builders, autoplaceholdering and Javascript solutions (ex. contextual links).
Finally the practical part will cover some of the most common mistakes people do when working with render arrays and when building their own controllers regarding caching. We'll cover Drupal caching default settings for autoplaceholdering, defaults non-cacheable contexts/tags and ways to effectively configure your caching strategy from settings.yml or disable caching for local development.
Takeaway
After this session you should be able to effectively debug caching issues and boost your site cacheability to the limits.