mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
tpl: Fix metrics hint tracking
When tracking for cache hints, track the same template name as the call to MeasureSince in Execute. When referencing a partial "foo", the value of `n` does not match `templ.Name()` (`partials/foo` versus `partials/foo.html`). This was causing hints to go untracked since there was no existing metric to append the hint to. Fixes #8125
This commit is contained in:
parent
8a26ab0bc5
commit
0004a733c8
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ func (ns *Namespace) Include(name string, contextList ...interface{}) (interface
|
|||
}
|
||||
|
||||
if ns.deps.Metrics != nil {
|
||||
ns.deps.Metrics.TrackValue(n, result)
|
||||
ns.deps.Metrics.TrackValue(templ.Name(), result)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
|
Loading…
Reference in a new issue