Skip to content

Add CachedAssetStore #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add CachedAssetStore #636

wants to merge 5 commits into from

Conversation

wbxyz
Copy link
Member

@wbxyz wbxyz commented Jul 16, 2025

No description provided.

wbxyz added 4 commits July 15, 2025 18:34
This allows callers to specialize what storage the Butler is using when
fetching assets.
When provided, the FilesystemAssetStore can insert the RunID as part of
the asset path, which matches the layout of the GCS asset store.

stacked-commit: true
stacked-commit: true
stacked-commit: true
@wbxyz wbxyz force-pushed the push-rppmsprxussy branch 2 times, most recently from 22d0f63 to ceb7293 Compare July 16, 2025 22:48
stacked-commit: true
@wbxyz wbxyz force-pushed the push-rppmsprxussy branch from ceb7293 to 4f5acdd Compare July 17, 2025 15:23
@@ -251,3 +251,93 @@ func NewFilesystemAssetStoreWithRunID(fs billy.Filesystem, runID string) *Filesy
func NewFilesystemAssetStore(fs billy.Filesystem) *FilesystemAssetStore {
return NewFilesystemAssetStoreWithRunID(fs, "")
}

type CachedAssetStore struct {
Copy link
Member

Choose a reason for hiding this comment

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

can we add some docs here specifying the caching behavior?

}

func (cr *cachedReader) Close() error {
_, flushErr := io.ReadAll(cr.tee)
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe a quick comment about why a flush is necessary here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants