feat(channel): enhance channel service with caching and repository updates
- Updated ChannelService to include caching for channel lists, improving performance and reducing database load. - Introduced cache invalidation methods to ensure channel list consistency after modifications. - Modified ChannelRepository to remove unused ListByIDs method, streamlining the repository interface. - Updated wire generation to inject cache into ChannelService for enhanced functionality. - Added new cache key constants for channel-related data management.
This commit is contained in:
@@ -62,7 +62,7 @@ func InitializeApp() (*App, error) {
|
||||
logService := wire.ProvideLogService(operationLogService, loginLogService, dataChangeLogService)
|
||||
userHandler := wire.ProvideUserHandler(userService, userActivityService, postService, commentService, logService)
|
||||
channelRepository := repository.NewChannelRepository(db)
|
||||
channelService := wire.ProvideChannelService(channelRepository)
|
||||
channelService := wire.ProvideChannelService(channelRepository, cache)
|
||||
postHandler := wire.ProvidePostHandler(postService, userService, channelService, logService)
|
||||
commentHandler := handler.NewCommentHandler(commentService)
|
||||
chatService := wire.ProvideChatService(db, messageRepository, userRepository, hub, cache)
|
||||
|
||||
Reference in New Issue
Block a user