mapnik / python-mapnik

Python bindings for mapnik
GNU Lesser General Public License v2.1
157 stars 91 forks source link

How to clear mapnik datasource cache when using shapefile? #200

Closed ccFiona closed 5 years ago

ccFiona commented 5 years ago

I'm using nginx+uwsgi+flask+python+mapnik to provide tile service. mapnik reads xml which uses shapefile as datasource to render tiles. My problem is that when shapefile content changes( e.g. shapefile name stays the same, delete an entry from the shapefile), mapnik still uses the old datasource even if I called mapnik.clear_cache() before rendering.
This is my production environment: uwsgi-2.0.17.1, python-2.7.5, mapnik-3.0.21 Any thoughts on how to solve this problem is highly appreciated.

ccFiona commented 5 years ago

problem solved. https://github.com/mapnik/mapnik/issues/4018#issuecomment-452260847