-
Notifications
You must be signed in to change notification settings - Fork 545
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
Add size limit to cache #675
Conversation
The command line argument is still missing, any suggestion how to parse it? Is there some standard notation for file sizes? I tried to google it, but I found nothing because I had no good keywords. |
Do you mean like "K" "M", "G" as used for human-readable output from |
Exactly |
From what I uderstand there is no agreed upon standard format that everyone uses. A bit of digging reveals there's I've probably butchered the capitalisation on the prefixes above, luckily the software I have used thus far been fairly forgiving of correct vs incorrect capitalisation. |
There are two standards, SI (base 10) and IEC (base 2). The numfmt manual is a good reference with correct formatting etc. The
|
fbcc085
to
98acc3d
Compare
As usual relevant http:https://xkcd.com/394/ |
I just realized that caching doesn't work anymore as expected. Probably streaming mode was broken by #658, so you'll have to listen a track to its end before it is added to the cache. I'll try to find the error and create a PR asap. |
Seems as if the check has hung up, dunno why. Could someone cancel it? |
f5fab10
to
2b36b65
Compare
I would like to point out that relying on Some operating systems, for example raspi os, add Some users add Applications should not rely on
|
If no access time is available, the modification time or creation time is used, or as last fallback the current time. This happens only on initialization, it keeps the access time in memory while the program is running. Lines 107 to 116 in 2b36b65
|
2b36b65
to
e355d4a
Compare
Looks good. Could you add the documentation to the wiki as well when you get a moment. |
Limits cache size by calculating the size of the directory on loading of the application and keeping track of additions and removals. As soon as the limit is exceeded, the least recently accessed files are deleted.
Resolves #642.