From cb4dfa286867d6bed61005fce24a524b96fccbda Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:18:40 +0300 Subject: [PATCH] added cache reset for ExApp events listeners (#264) Signed-off-by: Alexander Piskun --- lib/Service/ExAppService.php | 40 +++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/lib/Service/ExAppService.php b/lib/Service/ExAppService.php index 9371a17d..9ecd4ea5 100644 --- a/lib/Service/ExAppService.php +++ b/lib/Service/ExAppService.php @@ -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'); } @@ -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 {