diff --git a/controllers/controller.go b/controllers/controller.go index 30867c3..7f6db0a 100644 --- a/controllers/controller.go +++ b/controllers/controller.go @@ -79,7 +79,7 @@ func (t *Controller) cachePage(c echo.Context, p Page, html *bytes.Buffer) { } if p.Cache.MaxAge == 0 { - p.Cache.MaxAge = t.Container.Config.Cache.MaxAge.Page + p.Cache.MaxAge = t.Container.Config.Cache.Expiration.Page } key := c.Request().URL.String() diff --git a/controllers/router.go b/controllers/router.go index fe836a0..730c163 100644 --- a/controllers/router.go +++ b/controllers/router.go @@ -34,7 +34,7 @@ func BuildRouter(c *container.Container) { // Static files with proper cache control // funcmap.File() should be used in templates to append a cache key to the URL in order to break cache // after each server restart - c.Web.Group("", middleware.CacheControl(c.Config.Cache.MaxAge.StaticFile)). + c.Web.Group("", middleware.CacheControl(c.Config.Cache.Expiration.StaticFile)). Static(config.StaticPrefix, config.StaticDir) // Middleware