Skip to content

internal: cache package#1547

Merged
github-actions[bot] merged 2 commits intoquay:mainfrom
hdonnay:hack/cache-package
Sep 25, 2025
Merged

internal: cache package#1547
github-actions[bot] merged 2 commits intoquay:mainfrom
hdonnay:hack/cache-package

Conversation

@hdonnay
Copy link
Copy Markdown
Member

@hdonnay hdonnay commented May 22, 2025

This is a generic'd version of the rpm.PathSet cache.

Once merged, that implementation and the refcounting scheme in the fetcher can be replaced with cache.Live.

The package is named cache because we may want different cache strategies in the future, so we can just add more types here (e.g. S3Fifo, LRU).

@hdonnay hdonnay force-pushed the hack/cache-package branch from 9dc6d32 to 52b66a0 Compare May 27, 2025 14:57
@hdonnay hdonnay force-pushed the hack/cache-package branch from 52b66a0 to 6391abe Compare June 18, 2025 20:47
@hdonnay hdonnay force-pushed the hack/cache-package branch 4 times, most recently from 95d2062 to dab8c14 Compare September 5, 2025 20:34
@hdonnay hdonnay marked this pull request as ready for review September 5, 2025 20:34
@hdonnay hdonnay requested a review from a team as a code owner September 5, 2025 20:34
@hdonnay hdonnay requested review from crozzy and removed request for a team September 5, 2025 20:34
@hdonnay
Copy link
Copy Markdown
Member Author

hdonnay commented Sep 5, 2025

Undrafting this because I'd like to use it in the fetcher.

@hdonnay hdonnay requested a review from BradLugo September 11, 2025 21:11
@hdonnay hdonnay force-pushed the hack/cache-package branch 3 times, most recently from 0d7fd6d to f458ca7 Compare September 15, 2025 19:50
Copy link
Copy Markdown
Contributor

@crozzy crozzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of comments

Comment thread internal/singleflight/singleflight_test.go
Comment thread internal/singleflight/singleflight.go
Comment thread internal/cache/live.go
@hdonnay hdonnay force-pushed the hack/cache-package branch 2 times, most recently from a50df82 to 869a57c Compare September 24, 2025 21:33
@hdonnay hdonnay requested review from BradLugo and crozzy September 24, 2025 21:42
}
a, b = nil, nil

for range 2 { // Need two cycles:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know the reason?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely; I assume it has to do with marking the pointers dead, then running any cleanups

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked this out of curiosity, and it looks like a single runtime.GC() call works on go version go1.25.0 darwin/arm64

@hdonnay

This comment was marked as outdated.

@github-actions

This comment was marked as resolved.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
@hdonnay
Copy link
Copy Markdown
Member Author

hdonnay commented Sep 25, 2025

/fast-forward

@github-actions github-actions Bot merged commit a147cd0 into quay:main Sep 25, 2025
6 checks passed
@hdonnay hdonnay deleted the hack/cache-package branch September 25, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants