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

How to cleanly clear cache #111

Open
Tracked by #148
maysara opened this issue Dec 4, 2022 · 4 comments
Open
Tracked by #148

How to cleanly clear cache #111

maysara opened this issue Dec 4, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@maysara
Copy link

maysara commented Dec 4, 2022

Greetings, I'm using the cache function and I understand it is permanent, but I need to clear it as it got too big, restarting is not clearing it. what is the cleanest way to clear it? I have around 1300 mounted directories, so what should I do? turn the mount off and delete the path content?

@fangfufu
Copy link
Owner

fangfufu commented Dec 4, 2022

It is in your ~/.cache/httpdirfs. Do let me know if you have any more questions. :)

@fangfufu fangfufu added the enhancement New feature or request label Dec 5, 2022
@fangfufu
Copy link
Owner

fangfufu commented Dec 5, 2022

I probably should add an option to clear the cache.

@maysara
Copy link
Author

maysara commented Dec 9, 2022

I'm currently unmounting everything and deleting the folders content when I run out of cache disk space, I'm specifying a path for each mount separately, but as I'm not sure if I could keep meta and delete data for example.

What I wonder is where the line should be drawn between when to use httpdirfs cache and deploying an http cache server (nginx/varnish/squid/nuster) instead.

In my particular case, I would not mind keeping the files as long as I'm not running out of space, since I eventually will, finely controlling what to keep and how long ..etc might be better controlled by a proxy cache server, but what are the things that would make httpdirfs work faster/better in this constellation? should I just drop httpdirfs cache and rely on the http cache? is there a point in keeping both? what is internally gained/saved when accessing files from the httpdirfs cache vs. a local proxy cache?

@fangfufu
Copy link
Owner

@maysara , sorry for the late reply. I missed that you replied to the thread again.

I would say you should try benchmarking yourself. It depends on which proxy server you use. I don't know how proxy server cache partially downloaded files. The exact details is also implementation dependent.

What is certain is that proxy server probably won't cache HTTPS contents, whereas this filesystem definitely will. ?

I hope these help.

@fangfufu fangfufu mentioned this issue May 11, 2024
9 tasks
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

2 participants