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

Limit total size of cached tiles #223

Open
trohsb opened this issue Jan 20, 2021 · 4 comments
Open

Limit total size of cached tiles #223

trohsb opened this issue Jan 20, 2021 · 4 comments

Comments

@trohsb
Copy link

trohsb commented Jan 20, 2021

Is it possible to limit the total size of cached files to say 512MB and then delete tiles based on last accessed timestamps when space is needed?

@SomeoneElseOSM
Copy link
Contributor

@trohsb If you're trying to do something like that, https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/purge_old_tiles.sh might be a useful example to start from. See also https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/report_tile_size.sh and https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/report_database_size.sh . Each of those may need modifying to match your tile location. database location and mod_tile version of course.

@pantierra
Copy link
Collaborator

There are so many useful scripts around mod_tile. Wondering if at some point it would make sense to put them all together in a helper program with command-line arguments 🤔

@pantierra
Copy link
Collaborator

For now, @SomeoneElseOSM, do you think it would make sense to add these scripts to the utils directory and make them available here?

@SomeoneElseOSM
Copy link
Contributor

SomeoneElseOSM commented Feb 15, 2021

do you think it would make sense to add these scripts to the utils directory and make them available here?

Yes - but you'd ned to make sure that https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/purge_old_tiles.sh was using the standard mod_tiles's "long time ago" (20 years) as opposed to mine (10k days, which I chose because it's more visible when you're looking at dates on disk)

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

3 participants