Posted by sun on August 10, 2012 at 9:28pm
Spin-off from #1683644: Use Annotations for plugin discovery:
- CacheDecorator does not care for @Translation at all, which means that the identical plugin definitions are reloaded from cache, regardless of the current language. In short, the cache was primed in German, and I also saw the German plugin title when switching back to English.
- CacheDecorator does not specify cache tags for the entries it creates.
- CacheDecorator::__construct() defaults to a bogus
$cache_bin = 'default', which does not exist and has to be changed to
$cache_bin = 'cache'to make it cache anything in the first place.
Steps to reproduce
- Re-implant the CacheDecorator from #1683644-107: Use Annotations for plugin discovery
- Install Language and Locale modules
- Enable an additional language
- Translate "Default fetcher" (whatever that means :P) into the additional language
- Hack aggregator.admin.inc to also output the aggregator fetcher configuration widget in case there is only one
/admin/config/services/aggregator/settingsin one language, then in the other.
- Actual result: Default fetcher appears in wrong language.
- Expected result: Default fetcher appears in current language.
- CacheDecorator actually has to create proper cache IDs and cache tags for every single annotation that may appear in the @Plugin declaration.