Skip to content

Commit 9c7b7d4

Browse files
authored
Merge pull request #127 from ganto/feature/readme-update
Readme: Document newly added 'exclude' attribute
2 parents 023c92f + e9efe5a commit 9c7b7d4

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pre-commit run codespell --all-files
3434
- E2e tests must pass before a feature is considered complete.
3535
- Adding support for a new Linux distribution requires adding corresponding e2e tests.
3636
- Changes to client config snippets (sources.list, .repo files) must be replicated in the landing page snippets and in README.md.
37+
- New or changed configuration options (CLI flags, repository config keys) must be documented in README.md.
3738

3839
## OpenSpec
3940

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ Each repository supports the following options:
4444

4545
| Key | Required | Description |
4646
|-----|----------|-------------|
47-
| `suffixes` | yes | File suffixes that are eligible for caching (e.g. `.rpm`, `.deb`) |
47+
| `suffixes` | yes | File suffixes that are eligible for caching (e.g. `.rpm`, `.deb`). Use `"*"` to cache all files. |
48+
| `exclude` | no | List of file names to exclude from caching, even when they match a suffix. Useful with the `"*"` wildcard suffix. |
4849
| `mirrors` | yes | Ordered list of upstream mirror URLs |
4950
| `retries` | no | Number of attempts per mirror before moving to the next one (default: `1`) |
5051

@@ -73,6 +74,29 @@ on to the next one. An exponential backoff is applied between retry attempts
7374
(1s, 2s, 4s, ...). Only 5xx (server error) responses trigger a retry — client
7475
errors like 404 are returned immediately.
7576

77+
### Cache exclusions
78+
79+
When using the wildcard suffix `"*"` to cache all files, certain files (such as
80+
metadata or timestamps) should not be cached because they change frequently. The
81+
`exclude` option lets you list file names that will always be fetched from
82+
upstream, bypassing the cache:
83+
84+
```yaml
85+
repositories:
86+
gentoo:
87+
suffixes:
88+
- "*"
89+
exclude:
90+
- layout.conf
91+
- timestamp.mirmon
92+
- timestamp.dev-local
93+
mirrors:
94+
- https://distfiles.gentoo.org/
95+
```
96+
97+
Files whose name matches an entry in the `exclude` list are served directly from
98+
the upstream mirror without being stored in the local cache.
99+
76100
## Client Configuration
77101

78102
With the provided configuration a number of Linux distributions are handled. See below where and how the clients must be adjusted to use your instance of pkgproxy. Replace `<pkgproxy>` with the host name of the pkgproxy instance:

0 commit comments

Comments
 (0)