Skip to content

Caching when updating mbtiles in Martin #1322

Answered by nyurik
jjcfrancisco asked this question in Q&A
Discussion options

You must be logged in to vote

yes and no - mbtiles is a sqlite db - so if caching is disabled, it might actually be able to pick it up directly... That said, I would advise not to do it because sqlite is not usually recommended for read/write access from multiple processes. Instead, you can do the same thing relatively easily with a postgres db (i.e. just store things as blobs). On the other hand, for small installs / low usage, you might get away without having a proper server.

To do this in PostgreSQL, simply set up a table with z, x, y, data columns, and write a function that takes z,x,y and returns data. This is very similar to the structure of the mbtiles itself. You may want to use non-flat structure too, but it…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jjcfrancisco
Comment options

Answer selected by jjcfrancisco
Comment options

You must be logged in to vote
1 reply
@nyurik
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants