Constructs a LocaleCache object.
Overrides CacheArray::__construct
public function __construct($langcode, $context, $stringStorage) {
$this->langcode = $langcode;
$this->context = (string) $context;
$this->stringStorage = $stringStorage;
// Add the current user's role IDs to the cache key, this ensures that, for
// example, strings for admin menu items and settings forms are not cached
// for anonymous users.
$rids = implode(':', array_keys($GLOBALS['user']->roles));
parent::__construct("locale:{$langcode}:{$context}:{$rids}", 'cache', array(
'locale' => TRUE,
));
}