Bug report #10068
QGIS server caches layers with same ID but in different projects as one
|Affected QGIS version:||2.14.2||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18544|
When serving WMS maps, it seems QGIS servers caches the layers using their id, but with no regard to the project file.
myproject_1.qgs and myproject_2.gs both have a layer called mylayer with id mylayer20140515221023333 (this can easily happen if the project was duplicated for instance)
Displays mylayer as in myproject_1.
Displays mylayer as in myproject_1 instead of mylayer as in myproject_2 !!
At this point, the only way I found to display mylayer from myproject_2 is to restart the server, which makes it then in turn impossible to display mylayer from myproject1...
#1 Updated by Giovanni Manghi over 6 years ago
Unfortunately this is a well known issue, and there should be already a patch/pull request available.
One obvious solution would be to add a prefix like "projectname_" at the beginning of the actual layerid.
Please raise this issue in the dev mailing list, as it affects many (me included) I will underline too that a action must be taken.