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 do I limit cache disk usage? #573

Open
acejam opened this issue Nov 5, 2024 · 3 comments
Open

How do I limit cache disk usage? #573

acejam opened this issue Nov 5, 2024 · 3 comments

Comments

@acejam
Copy link

acejam commented Nov 5, 2024

Hello,

i'd like to use Souin with Caddy and leverage one of the disk-based storage adapters - such as Badger or NutsDB.

In an effort to prevent "out of disk" system errors, how can I limit the amount of disk space that can be used by the cache?

@darkweak
Copy link
Owner

darkweak commented Nov 6, 2024

Hey @acejam I think that's not possible ATM with these storages. Maybe we could implement the directory size in the simplefs storage https://github.com/darkweak/storages.

@acejam
Copy link
Author

acejam commented Nov 6, 2024

Hey @acejam I think that's not possible ATM with these storages. Maybe we could implement the directory size in the simplefs storage https://github.com/darkweak/storages.

Thanks for the idea. Is the size parameter not used for this already? https://github.com/darkweak/storages/blob/main/simplefs/simplefs.go#L73

@darkweak
Copy link
Owner

darkweak commented Nov 6, 2024

The size is about the number of objects to store but it doesn't limit the filesystem size.

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

No branches or pull requests

2 participants