Skip to content

Commit

Permalink
added cache reset for ExApp events listeners (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 authored Apr 4, 2024
1 parent 36c2db5 commit cb4dfa2
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions lib/Service/ExAppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,26 @@ class ExAppService {
private ICache $cache;

public function __construct(
private readonly LoggerInterface $logger,
ICacheFactory $cacheFactory,
private readonly IUserManager $userManager,
private readonly ExAppFetcher $exAppFetcher,
private readonly ExAppArchiveFetcher $exAppArchiveFetcher,
private readonly ExAppMapper $exAppMapper,
private readonly ExAppUsersService $exAppUsersService,
private readonly ExAppScopesService $exAppScopesService,
private readonly ExAppApiScopeService $exAppApiScopeService,
private readonly TopMenuService $topMenuService,
private readonly InitialStateService $initialStateService,
private readonly ScriptsService $scriptsService,
private readonly StylesService $stylesService,
private readonly FilesActionsMenuService $filesActionsMenuService,
private readonly SpeechToTextService $speechToTextService,
private readonly TextProcessingService $textProcessingService,
private readonly TranslationService $translationService,
private readonly TalkBotsService $talkBotsService,
private readonly SettingsService $settingsService,
private readonly LoggerInterface $logger,
ICacheFactory $cacheFactory,
private readonly IUserManager $userManager,
private readonly ExAppFetcher $exAppFetcher,
private readonly ExAppArchiveFetcher $exAppArchiveFetcher,
private readonly ExAppMapper $exAppMapper,
private readonly ExAppUsersService $exAppUsersService,
private readonly ExAppScopesService $exAppScopesService,
private readonly ExAppApiScopeService $exAppApiScopeService,
private readonly TopMenuService $topMenuService,
private readonly InitialStateService $initialStateService,
private readonly ScriptsService $scriptsService,
private readonly StylesService $stylesService,
private readonly FilesActionsMenuService $filesActionsMenuService,
private readonly SpeechToTextService $speechToTextService,
private readonly TextProcessingService $textProcessingService,
private readonly TranslationService $translationService,
private readonly TalkBotsService $talkBotsService,
private readonly SettingsService $settingsService,
private readonly ExAppEventsListenerService $appEventsListenerService,
) {
$this->cache = $cacheFactory->createDistributed(Application::APP_ID . '/service');
}
Expand Down Expand Up @@ -238,6 +239,7 @@ private function resetCaches(): void {
$this->speechToTextService->resetCacheEnabled();
$this->translationService->resetCacheEnabled();
$this->settingsService->resetCacheEnabled();
$this->appEventsListenerService->resetCacheEnabled();
}

public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo): array {
Expand Down

0 comments on commit cb4dfa2

Please sign in to comment.