maptiler / tileserver-php

MBTiles and MapTiler folder hosting with TileJSON, OGC WMTS, UTFGrid interaction and web interface. QGIS & ESRI ArcGIS compatible. Runs on any Apache+PHP webhosting. MapBox Studio Vector Tiles hosting.
http://tileserver.maptiler.com/
565 stars 164 forks source link

When the file is updated, we can reload the file make it work without a restart #151

Open maxpaynebupt opened 4 years ago

maxpaynebupt commented 4 years ago

Old: ` if ($this->isModified($tileset) == true) {

    header('Access-Control-Allow-Origin: *');
    header('HTTP/1.1 304 Not Modified');
    die;
  }

`

new: ` if ($this->isModified($tileset) == TRUE) {

    /** reload if file modified */
    __construct();
    /*
    header('Access-Control-Allow-Origin: *');
    header('HTTP/1.1 304 Not Modified');
    die;
    */
  }

`

daliborjanak commented 4 years ago

This is a performance thing and it does not make sense to do that. There can be an optional variable in the config to turn fo last modified but IMHO it will be ton usable too much