feat:为video的getdetail添加redis缓存

This commit is contained in:
Leon
2025-12-23 19:04:24 +08:00
parent f884167db8
commit f524123ea6
2 changed files with 33 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ func SetRouter(db *gorm.DB, cache *rediscache.Client) *gin.Engine {
}
// video
videoRepository := video.NewVideoRepository(db)
videoService := video.NewVideoService(videoRepository)
videoService := video.NewVideoService(videoRepository, cache)
videoHandler := video.NewVideoHandler(videoService, accountService)
videoGroup := r.Group("/video")
{