diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-04-25 12:30:16 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-04-25 14:35:49 +0200 |
commit | 7203a95a6069b09a7546e5b2e286abe6455df83a (patch) | |
tree | b61d582829a705f6eb47ba84ff697b656c5a79f6 /cache | |
parent | fb084390cd8f2f62220489b8f1692863f57b25b6 (diff) | |
download | hugo-7203a95a6069b09a7546e5b2e286abe6455df83a.tar.gz hugo-7203a95a6069b09a7546e5b2e286abe6455df83a.zip |
Fix rebuilds when running hugo -w
This was partly broken in Hugo 0.123.0.
We have two internal config options that gets set from the CLI:
* Running; a web server is running
* Watching; either set via `hugo -w` or `hugo server --watch=false`
Part of the change detection code wrongly used the `Running` as a flag when `Watching` would be the correct.
Fixes #12296
Diffstat (limited to 'cache')
-rw-r--r-- | cache/dynacache/dynacache.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cache/dynacache/dynacache.go b/cache/dynacache/dynacache.go index e79de5a5b..87ef68f5b 100644 --- a/cache/dynacache/dynacache.go +++ b/cache/dynacache/dynacache.go @@ -67,7 +67,7 @@ func New(opts Options) *Cache { evictedIdentities := collections.NewStack[identity.Identity]() onEvict := func(k, v any) { - if !opts.Running { + if !opts.Watching { return } identity.WalkIdentitiesShallow(v, func(level int, id identity.Identity) bool { @@ -97,7 +97,7 @@ type Options struct { CheckInterval time.Duration MaxSize int MinMaxSize int - Running bool + Watching bool } // Options for a partition. |