add caching for not test prod
parent
914842291f
commit
41c1da9c6e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue