hugo-wasm/resources
Bjørn Erik Pedersen db28695ff5 Fix some server/watch rebuild issues
Two issues:

1. Fixe potential edit-loop in server/watch mode (see below)
2. Drain the cache eviction stack before we start calculating the change set. This should allow more fine grained rebuilds for bigger sites and/or in low memory situations.

The fix in 6c68142cc1 wasn't really fixing the complete problem.

In Hugo we have some steps that takes more time than others, one example being CSS building with TailwindCSS.

The symptom here is that sometimes when you:

1. Edit content or templates that does not trigger a CSS rebuild => Snappy rebuild.
2. Edit stylesheet or add a CSS class to template that triggers a CSS rebuild => relatively slow rebuild (expected)
3. Then back to content editing or template edits that should not trigger a CSS rebuild => relatively slow rebuild (not expected)

This commit fixes this by pulling the dynacache GC step up and merge it with the cache buster step.

Fixes #13316
2025-02-01 16:29:14 +01:00
..
assets Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
images resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
internal Consolidate all hashing to the common/hashing package 2024-07-31 16:44:06 +02:00
jsconfig all: Fix typos in function names and comments 2023-06-19 09:26:29 +02:00
kinds all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page Fix "concurrent map iteration and map write" in pages from data 2025-01-30 19:57:09 +01:00
postpub Create pages from _content.gotmpl 2024-05-14 13:12:08 +02:00
resource resources: Replace error handling in GetRemote with try (note) 2025-01-06 12:22:17 +01:00
resource_factories Fix some server/watch rebuild issues 2025-02-01 16:29:14 +01:00
resource_transformers resources: Remove debug statement 2025-01-30 11:32:57 +01:00
testdata resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
docs.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
image.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
image_cache.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
image_extended_test.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
image_test.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
post_publish.go Add basic "post resource publish support" 2020-04-07 21:59:20 +02:00
resource.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
resource_cache.go Fix same resource file published more than once 2024-12-27 18:55:24 +01:00
resource_metadata.go Add js.Batch 2024-12-12 21:43:17 +01:00
resource_spec.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
resource_spec_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
resource_test.go Add js.Batch 2024-12-12 21:43:17 +01:00
resources_integration_test.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00
testhelpers_test.go resource: Revert the normalization of Resource.Name 2024-02-25 14:57:29 +01:00
transform.go resources: Remove debug statement 2025-01-30 11:32:57 +01:00
transform_integration_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
transform_test.go resources: Fix 2 image file cache key issues 2025-01-18 12:23:18 +01:00