mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Fix cache reset for a page's collections on server live reload
Fixes #7085
This commit is contained in:
parent
244e49c0ea
commit
cfa73050a4
3 changed files with 8 additions and 1 deletions
|
@ -797,6 +797,10 @@ type pagesMapBucket struct {
|
||||||
|
|
||||||
owner *pageState // The branch node
|
owner *pageState // The branch node
|
||||||
|
|
||||||
|
*pagesMapBucketPages
|
||||||
|
}
|
||||||
|
|
||||||
|
type pagesMapBucketPages struct {
|
||||||
pagesInit sync.Once
|
pagesInit sync.Once
|
||||||
pages page.Pages
|
pages page.Pages
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ func newPageBase(metaProvider *pageMeta) (*pageState, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func newPageBucket(p *pageState) *pagesMapBucket {
|
func newPageBucket(p *pageState) *pagesMapBucket {
|
||||||
return &pagesMapBucket{owner: p}
|
return &pagesMapBucket{owner: p, pagesMapBucketPages: &pagesMapBucketPages{}}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newPageFromMeta(
|
func newPageFromMeta(
|
||||||
|
|
|
@ -1492,6 +1492,9 @@ func (s *Site) resetBuildState(sourceChanged bool) {
|
||||||
s.PageCollections = newPageCollections(s.pageMap)
|
s.PageCollections = newPageCollections(s.pageMap)
|
||||||
s.pageMap.withEveryBundlePage(func(p *pageState) bool {
|
s.pageMap.withEveryBundlePage(func(p *pageState) bool {
|
||||||
p.pagePages = &pagePages{}
|
p.pagePages = &pagePages{}
|
||||||
|
if p.bucket != nil {
|
||||||
|
p.bucket.pagesMapBucketPages = &pagesMapBucketPages{}
|
||||||
|
}
|
||||||
p.parent = nil
|
p.parent = nil
|
||||||
p.Scratcher = maps.NewScratcher()
|
p.Scratcher = maps.NewScratcher()
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue