add caching for not test prod

hotfix/hotfix-mysql-error
Ernest Litvinenko 2024-03-23 21:17:59 +03:00
parent 914842291f
commit 41c1da9c6e
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ func HandleRoutes(parent *gin.RouterGroup) {
if os.Getenv("IS_PROD") == "1" {
// Caching for production usage
catalog.GET("", cache.CachePage(cacheStore, 15*time.Minute, h.GetCatalogItems))
catalog.GET("/filters", cache.CachePage(cacheStore, 15*time.Minute, h.GetFilters))
}
catalog.GET("", h.GetCatalogItems)