mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 17:57:04 +08:00
Removes duplication of cache clearing (#2738)
This commit is contained in:
parent
54155dbe1e
commit
cedee652db
|
@ -10,25 +10,13 @@
|
|||
namespace Flarum\Locale;
|
||||
|
||||
use Flarum\Foundation\AbstractServiceProvider;
|
||||
use Flarum\Foundation\Event\ClearingCache;
|
||||
use Flarum\Foundation\Paths;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Contracts\Translation\Translator as TranslatorContract;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class LocaleServiceProvider extends AbstractServiceProvider
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function boot(Dispatcher $events)
|
||||
{
|
||||
$events->listen(ClearingCache::class, function () {
|
||||
$this->container->make('flarum.locales')->clearCache();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user