feat: add a --schema flag to dump the HCL schema#51
Merged
alecthomas merged 1 commit intomainfrom Jan 21, 2026
Merged
Conversation
Current schema:
```hcl
// The stable API of the cache server.
apiv1 {}
// Caches artifacts from an Artifactory server.
artifactory target {
// List of hostnames to accept for host-based routing. If empty, uses path-based routing only.
hosts = [string](optional)
}
// Caches objects on local disk, with a maximum size limit and LRU eviction
disk {
// Root directory for the disk storage.
root = string
// Maximum size of the disk cache in megabytes (defaults to 10GB).
limit-mb = number(optional default(10240))
// Maximum time-to-live for entries in the disk cache (defaults to 1 hour).
max-ttl = string(optional default("1h"))
// Interval at which to check files for eviction (defaults to 1 minute).
evict-interval = string(optional default("1m"))
}
// Caches Git repositories, including bundle and tarball snapshots.
git {
// Directory to store git clones.
mirror-root = string
// How often to fetch from upstream in minutes.
fetch-interval = string(optional default("15m"))
// How long to cache ref checks.
ref-check-interval = string(optional default("10s"))
// How often to generate bundles. 0 disables bundling.
bundle-interval = string(optional default("0"))
// Depth for shallow clones. 0 means full clone.
clone-depth = number(optional default(0))
}
// Caches public and authenticated GitHub releases.
github-releases {
// GitHub token for authentication.
token = string
// List of private GitHub organisations.
private-orgs = [string]
}
// A generic host-based proxying strategy.
host target {}
// Caches objects in memory, with a maximum size limit and LRU eviction
memory {
// Maximum size of the disk cache in megabytes (defaults to 1GB).
limit-mb = number(optional default(1024))
// Maximum time-to-live for entries in the disk cache (defaults to 1 hour).
max-ttl = string(optional default("1h"))
}
// Caches objects in S3
s3 {
// S3 bucket name.
bucket = string
// S3 endpoint URL (e.g., s3.amazonaws.com or localhost:9000).
endpoint = string(optional default("s3.amazonaws.com"))
// S3 region (defaults to us-west-2).
region = string(optional default("us-west-2"))
// Use SSL for S3 connections (defaults to true).
use-ssl = boolean(optional default(true))
// Skip SSL certificate verification (defaults to false).
skip-ssl-verify = boolean(optional default(false))
// Maximum time-to-live for entries in the S3 cache (defaults to 1 hour).
max-ttl = string(optional default("1h"))
// Number of concurrent workers for multi-part uploads (0 = use all CPU cores, defaults to 1).
upload-concurrency = number(optional default(1))
// Size of each part for multi-part uploads in megabytes (defaults to 16MB, minimum 5MB).
upload-part-size-mb = number(optional default(16))
}
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current schema from running
cachewd --schema