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:
@@ -173,8 +173,8 @@ func ProvideVoteService(
|
||||
return service.NewVoteService(voteRepo, postRepo, cache, postAIService, systemMessageService)
|
||||
}
|
||||
|
||||
func ProvideChannelService(channelRepo *repository.ChannelRepository) service.ChannelService {
|
||||
return service.NewChannelService(channelRepo)
|
||||
func ProvideChannelService(channelRepo *repository.ChannelRepository, cacheBackend cache.Cache) service.ChannelService {
|
||||
return service.NewChannelService(channelRepo, cacheBackend)
|
||||
}
|
||||
|
||||
// ProvideChatService 提供聊天服务
|
||||
|
||||
Reference in New Issue
Block a user