[Qgis-developer] strange GetCapabilities caching

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Aug 1 06:36:14 PDT 2016

Hi Nicklas,

Just a heads up that this is still an issue with 2.16.0; however now it 
seems to be even worse now:

  - the "Clear" button for clearing the cache has now been changed to an 
icon with arrows, that is confusing to the user.  I think a button with 
the words "Clear Cache" makes more sense.
  - I just now spent 4 hours trying to get a service to appear in QGIS, 
and the issue was that pressing the clear cache icon in QGIS 2.16.0 
wasn't actually clearing the cache: I had to go into 
C:/Users/Jeff/.qgis/cache/data7/ and manually delete the contents of 
that folder, and magically my WMS service worked in QGIS

Keep your heads up for that issue.


Jeff McKenna
MapServer Consulting and Training Services

On 2016-03-28 3:16 PM, Nicklas Avén wrote:
> Hallo all
> First, Thanks a lot for QGIS and QGIS Server. It is  amazing software.
> But now I have had a very frustrating problem for the last 5 hours.
> After setting up a working QGIS server a few weeks ago, I now returned
> to see everything working after some major refactoring at the database.
> Nothing worked, and after some hours I started to get really frustrated
> since we have just a few weeks until we go in production and I really
> don't want to replace QGIS Server because of unpredictable behavior.
> The error I had was:
> Invalid Layer: WMS provider Cannot calculate extent Raster layer
> Provider is not valid (provider: wms, URI:
> contextualWMSLegend=0&crs=EPSG:4326&dpiMode=7&featureCount=10 ...
> on all layers but one.
> I saw this question was asked several times at the net, but no one
> seemed to have had any answer:
> https://hub.qgis.org/issues/10634
> https://hub.qgis.org/issues/7712
> http://osgeo-org.1560.x6.nabble.com/qgisserver-problem-td5095165.html
> The last link solved it by a fresh install and now I understand why.
> Finally I found the answer
> http://osgeo-org.1560.x6.nabble.com/WMS-provider-Cannot-calculate-extent-td5250516.html
> But the OP didn't get an answer of his follow up question: Why the h...
> is the GetCapabilities cached?
> I ask the same thing, especially since a new version of GetCapabilities
> is also fetched.
> This is what made me use 5 hours on debugging (including turning the
> server inside out, both database and uwsgi, nginx and so on).
> The layers presented when connecting to the wms server was fresh and
> new. But it seems like, when I tried to add the layer it used a cached
> GetCapabilities, which didn't correspond to my new setup on the server.
> I could also sniff the GetCapabilities request. But I also saw that no
> request was made when I tried to add the layer. So, now when I see the
> whole picture I look rather stupid, but I couldn't imagine that I had
> fresh data when connecting, but old data when trying to add the map.
> Another thing that made things bad was the error message just flashing
> on the top of my map. It didn't write anything to the log windows from
> what I could see, and the message was shown in a too thin box. So I had
> to try to add the layer, quickly close the "Add WMS window" and copy the
> text in the too thin box to be able to read it.
> Sorry for my frustrated tone. I still really love QGIS. But software
> (any software) can drive you crazy sometimes.
> I also suspect that I might get into exactly the same trap after a few
> months when i have forgotten this. I hope I find this mail then on my
> googling :-)
> Regards
> Nicklas Avén

More information about the Qgis-developer mailing list