Skip to content
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

Cache storage size & retention #118

Open
hoerup opened this issue Mar 15, 2024 · 5 comments
Open

Cache storage size & retention #118

hoerup opened this issue Mar 15, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@hoerup
Copy link

hoerup commented Mar 15, 2024

When using BaGetter as a mirror service it would be nice to have some control over how much data is used and perhaps a retention/eviction policy

@seriouz
Copy link

seriouz commented Mar 18, 2024

What do you mean exactly? How much data BaGetter is allowed to download from the upstream? Or how much data gets downloaded from BaGetter?

@Regenhardt
Copy link

Regenhardt commented Mar 18, 2024

I could imagine an optional setting for the read-through cache like "RemoveUnusedAfterDays" that, when set, somehow checks when a cached package was last requested and removes it from the cache after the specified time.
+ stable/prerelease differentiation?

Control over how much data is used might be difficult. For starters there is currently no way of seeing how much data is actually being used, unless we roll it ourselves and basically just load and sum up all packages.

Then if we have this information, what to do when we hit a set limit?

  • Delete oldest (least recently requested) package from cache (stable vs. prerelease)?
  • Do we ever delete packages from our own repository? This one is risky.
  • Passive reactions: Stop read-through caching more packages, block new uploads?

@Regenhardt Regenhardt added the enhancement New feature or request label Mar 19, 2024
@Nefarion
Copy link

I don't know the internals, but maybe some system along the lines of:

  • Packages that are cached from nuget.org should be marked somehow (e.g. nuget source address)
  • A setting that controls how many versions of "cached" nuget.org packages will be kept (e.g. max 5)
  • If a new version of a nuget.org package is cached, check if there are more than 5 versions present, if yes, evict the oldest.

This would keep "manually" uploaded/pushed packages safe, and would evict old unused versions of cached packages.

Copy link

This issue is stale because it has been open for 90 days with no activity. Remove the stale label, comment, or this will be closed in 5 days.

@hoerup
Copy link
Author

hoerup commented Jun 19, 2024

.

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

No branches or pull requests

4 participants