bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
166 stars 38 forks source link

Cache storage size & retention #118

Open hoerup opened 3 months ago

hoerup commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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?

Nefarion commented 3 months ago

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

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

github-actions[bot] commented 1 week ago

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 commented 1 week ago

.