Skip to content

goss serve cache should separate results from output #612

@petemounce

Description

@petemounce

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

  1. It would be more time-efficient (but cost memory) to cache in two stages

    1. the result of a validate run
    2. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions