chore: redis cache for calendars in api v2 (#23622)
* chore: implement redis cache for calendars api v2 * fixup! chore: implement redis cache for calendars api v2 * fixup! fixup! chore: implement redis cache for calendars api v2 * fix leverage genetic type of redis.get * refactor: address supalarry's PR feedback - Create CalendarsCacheService to separate cache responsibilities - Rename cache methods to be more descriptive (getConnectedAndDestinationCalendarsCache, setConnectedAndDestinationCalendarsCache) - Remove unused redisService injection from CalendarsController - Move all cache-related functionality to dedicated service Addresses comments 9, 10, and 11 from supalarry on PR #23622 Co-Authored-By: [email protected] <[email protected]> * refactor: address supalarry's latest PR feedback - Remove redundant deleteConnectedAndDestinationCalendarsCache from CalendarsService - Update controller to directly inject and use CalendarsCacheService - Extract TTL constant and remove manual JSON.stringify in cache service Co-Authored-By: [email protected] <[email protected]> * fix: update IcsFeedService to use CalendarsCacheService directly - Inject CalendarsCacheService into IcsFeedService constructor - Replace calendarsService.deleteCalendarCache with calendarsCacheService.deleteConnectedAndDestinationCalendarsCache - Completes the refactoring to eliminate all old cache method references Co-Authored-By: [email protected] <[email protected]> * fix: update destination-calendars and selected-calendars services to use CalendarsCacheService directly - Inject CalendarsCacheService in both service constructors - Replace calendarsService.deleteCalendarCache calls with calendarsCacheService.deleteConnectedAndDestinationCalendarsCache - Add CalendarsCacheService to module providers for proper dependency injection - Completes migration of all cache method references to use dedicated cache service Co-Authored-By: [email protected] <[email protected]> * chore: use CalendarsCacheService --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
17 files changed
+205
-21
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { CalendarsRepository } from "@/ee/calendars/calendars.repository";
|
||||
import { CalendarsCacheService } from "@/ee/calendars/services/calendars-cache.service";
|
||||
import { CalendarsService } from "@/ee/calendars/services/calendars.service";
|
||||
import { EventTypesModule_2024_04_15 } from "@/ee/event-types/event-types_2024_04_15/event-types.module";
|
||||
import { SchedulesModule_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/schedules.module";
|
||||
@@ -49,6 +50,7 @@ import { JwtService } from "@nestjs/jwt";
|
||||
TokensRepository,
|
||||
OAuthFlowService,
|
||||
CalendarsService,
|
||||
CalendarsCacheService,
|
||||
CredentialsRepository,
|
||||
AppsRepository,
|
||||
CalendarsRepository,
|
||||
|
||||
Reference in new issue
Block a user