User Reference Field Cache Context

This module implements a new cache context, based on the value of a reference field on the current user. To use this new cache context in your own module, after installing this module add a cache content like user.ref_field:field_foo where field_foo is the machine name of the reference field (e.g. taxonomy reference) whose value on the current user should alter what is being cached.