The Cache API is much improved in Drupal 8. The following sections go into more detail on each feature.
Cache tags = data dependencies
Cache contexts = (request) context dependencies
Cache max-age = time dependencies
Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. Varnish is used on thousands of Drupal sites to
To make dealing with cacheability metadata (cache tags, cache contexts and max-age) easier, Drupal 8 has CacheableDependencyInterface.
This interface lives at the intersection of the Cache API and Responses. Since it is first and foremost a response, that's where the
Route access checkers, hook_entity_access() and anything that needs to return an AccessResultInterface object should add the appropriate