Variable naming cleanup.

This commit is contained in:
mikestefanello 2021-12-11 19:32:34 -05:00
parent bbf27d1b04
commit 5582bb6acd
5 changed files with 51 additions and 46 deletions

View file

@ -78,16 +78,17 @@ func (t *Controller) cachePage(c echo.Context, p Page, html *bytes.Buffer) {
return
}
if p.Cache.MaxAge == 0 {
p.Cache.MaxAge = t.Container.Config.Cache.Expiration.Page
if p.Cache.Expiration == 0 {
p.Cache.Expiration = t.Container.Config.Cache.Expiration.Page
}
key := c.Request().URL.String()
opts := &store.Options{
Expiration: p.Cache.MaxAge,
Expiration: p.Cache.Expiration,
Tags: p.Cache.Tags,
}
cp := middleware.CachedPage{
URL: key,
HTML: html.Bytes(),
Headers: p.Headers,
StatusCode: p.StatusCode,