This recipe is deprecated as of
Use user context providers from FOSHttpCacheBundle instead.
Be sure to have read Context aware HTTP cache documentation before reading this recipe.
When user hash generation is requested, eZ Publish will create a hashable User Identity object.
One can add information to the Identity object making the resulted hash vary. This can be done by registering Identity definers.
For this, all you need to do is to declare a service with
ezpublish.identity_definer tag. Class for this service must implement