We need to provide a country cache context.
Drupal says:
Cache contexts are services tagged with 'cache.context', whose classes implement \Drupal\Core\Cache\Context\CacheContextInterface.
See https://www.drupal.org/developing/api/8/cache/contexts → for more information on cache contexts, including a list of the contexts that exist in Drupal core, and information on how to define your own contexts.
Core service we should use as an example:
cache_context.theme:
class: Drupal\Core\Cache\Context\ThemeCacheContext
arguments: ['@theme.manager']
tags:
- { name: cache.context}
We need:
1) An entry in commerce.services.yml
2) The src/Cache/Context/CountryCacheContext class.
The CountryCacheContext needs to take the CountryContext as a dependency, and return the resolved country code in getContext().
Fixed
2.0
Developer experience
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.