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 reduce the remote-raw directory usage ? #214

Closed
bhzhu203 opened this issue May 23, 2023 · 6 comments
Closed

How to reduce the remote-raw directory usage ? #214

bhzhu203 opened this issue May 23, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@bhzhu203
Copy link

I see that when using Remote Backend , the "remote-raw" directory is created automatically .And it will become more and more biger ,even ls/rm command can not list . EXHAUST_PATH is the same as it.

1.Is there something limilation can limit the usage ?
2. Does the remote-raw directory store the one time downloaded files ? or can be reused?
3. Does the remote-raw/EXHAUST_PATH directory can keep the hot data and delete the cold data ?

Thanks

@BennyThink BennyThink added the question Further information is requested label May 23, 2023
@n0vad3v
Copy link
Member

n0vad3v commented May 24, 2023

  1. Currently no.
  2. Files inside remote-raw are the same as in origin, will be reused if the origin's file hasn't changed.
  3. No. Currently a workaround is to create crontab to automatically delete files created > x days.

@BennyThink
Copy link
Member

We may add limitation of directory(remote-raw, exhaust) in next major version

@BennyThink BennyThink added the enhancement New feature or request label May 28, 2023
@greenhost87
Copy link

@n0vad3v About crontab for cleaning - is enough to clean remote-raw, exhaust or clean also must clean metadata folders?

@BennyThink
Copy link
Member

remove-raw and exhaust are enough.

@BennyThink
Copy link
Member

0 0 * * * find /path/to/your/webp/exhaust/ -type f -ctime +1 -exec rm {} \;

@n0vad3v
Copy link
Member

n0vad3v commented Jun 29, 2024

Hi @bhzhu203 ,We've released version 0.12.0 which contains a configuration called MAX_CACHE_SIZE that will automatically clean local files if local cache directories' size are larger than setting value, please give it a shot if you're interested. 😇
https://github.com/webp-sh/webp_server_go/releases/tag/0.12.0

Documentation: https://docs.webp.sh/usage/configuration/

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

No branches or pull requests

4 participants