General

The Advanced Page Cache module allows one to leverage Drupal 8 core's page_cache module to build a contextual cache id.

Technical implementation

The Advanced Page Cache module makes use of the Service Collector pattern and allows a service definition to be tagged with the advanced_page_cache_cid tag.
The module contains two dummy example modules (cookie_page_cache and ip_page_cache).