Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve content map, memory cache and dependency resolution
TODO(bep) improve commit message. Hugo has always been a active user of in-memory caches, but before this commit we did nothing to control the memory usage. One failing example would be loading lots of big JSON data files and unmarshal them via `transform.Unmarshal`. This commit consolidates all these caches into one single LRU cache with an eviction strategy that also considers used vs. available memory. Hugo will try to limit its memory usage to 1/4 or total system memory, but this can be controlled with the `HUGO_MEMORYLIMIT` environment variable (a float value representing Gigabytes). A natural next step after this would be to use this cache for `.Content`. Fixes gohugoio#8307 Fixes gohugoio#8498 Fixes gohugoio#8927 Fixes gohugoio#9192 Fixes gohugoio#9189 Fixes gohugoio#7425 Fixes gohugoio#7437 Fixes gohugoio#7436 Fixes gohugoio#7882 Updates gohugoio#7544 Fixes gohugoio#9224
- Loading branch information