tileserver-php icon indicating copy to clipboard operation
tileserver-php copied to clipboard

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

Open maxpaynebupt opened this issue 4 years ago • 1 comments

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;
    */
  }

`

maxpaynebupt avatar Apr 07 '20 02:04 maxpaynebupt

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

daliborjanak avatar Apr 20 '20 14:04 daliborjanak