| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR reduces central configuration distribution load by adding standard HTTP caching semantics (freshness + conditional revalidation) for HTTP-based repos, and by making the distribution polling cadence configurable via dist.poll_interval (default remains 10s).
Changes:
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file| File | Description |
|---|---|
| state/validation.go | Validates dist.poll_interval is present and positive when configured. |
| state/config.go | Adds PollInterval *time.Duration to DistributionCfg with YAML mapping. |
| state/config_distribution_test.go | Tests YAML unmarshalling of poll_interval and validator enforcement. |
| example/sample-central.yaml | Documents and demonstrates poll_interval usage in sample config. |
| docs/reference/config.mdx | Updates config reference docs to include poll_interval and HTTP caching behavior. |
| docs/guides/config-distribution.mdx | Expands distribution guide with poll_interval and caching details. |
| core/nylon.go | Adds configFetcher + configPollDelay fields, initializes fetcher, and wires cleanup. |
| core/nylon_scheduler.go | Adds RepeatTaskDynamic to support runtime-adjustable polling intervals. |
| core/nylon_distribution.go | Implements caching-aware HTTP fetching and integrates it into periodic config polling. |
| core/nylon_distribution_test.go | Adds tests for ETag/Last-Modified behavior, freshness handling, and poll delay updates. |
| core/nylon_apply.go | Updates poll delay when a new central config is successfully applied. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I noticed that Nylon currently doesn’t use HTTP caching when fetching distributed configuration, and its polling interval isn’t configurable. This can put more load on the central HTTP server than necessary. (And cost me a few cent more in bandwidth from my CDN provider).
This PR adds standard HTTP caching—including ETag and Last-Modified revalidation—and makes the config fetch interval configurable through dist.poll_interval. Existing behavior remains unchanged by default, with polling every 10 seconds.