-
Notifications
You must be signed in to change notification settings - Fork 486
Closed
Labels
Description
Describe the feature:
Implementation detail change.
Sliced work from #609 (comment) discussion.
goss serve
has a cache. Currently, this caches rendered output.
#609 introduces the possibility of different rendered output for the same validate-run.
It's important that the rendered outputs all tie back to the same instance of a validate-run.
Describe the solution you'd like
Cache the validate-run results only, and don't cache the output rendering
- ... because the hypothesis is that the output rendering is trivially fast
Describe alternatives you've considered
-
It would be more time-efficient (but cost memory) to cache in two stages
- the result of a validate run
- the rendered output
... but
- it would introduce complexity to the cache
- need to expire the output cache entries that are tied to a results-cache entry, when that expiry occurs
- ideally want configurability options like max-cache-size
- we don't (currently) have a convenient way to repeatably profile this to see whether
- this would in fact be a net-positive in speed, compared to a regression
- the extra memory is worthwhile
- the speed is worth the memory + complexity