Closed TANK2003 closed 1 year ago
Are you talking about the projects cache ? If you do not use project's cache , they will be reloaded at each request which will be a huge performance penalty.
You can always use a cache size of 1, but I don't see any reason to give up projects cache.
What problem are you trying to solve ?
Re,
So i'am tryng to regenerate getcapabilities request at each query
Maybe if i whrite a custom Loader schemes ? Where a projet will be the combination of project name
&user connected
?
Yes i'am talking about the project Cache
Your question is about the GetCapabilities response, which is not related to project's cache.
As a matter of fact the capabilities document is not cached at all by the server, but use standard client cache headers:
Py-qgis-server return getcapabilities response with Etag
headers, if the client request the same capabability document with a If-None-Match
header with a matching Etag value then a 304 Not Modified
is returned.
If you want the capabilities to be returned on each request, then bypass client cache Etag headers (from javascript, use non-cached fetch requests) , then the request will reach your plugin.
You may also disable etag generation on server side by disabling the TRUST_LAYER_METADATA option.
Will try it known and give a feedback. Thanks !
Hello, For all this i have disable the etag header on py-qgis-server.
I have try :
To bypass cached request in both postman/application (running in chrome) by adding in header Cache-Control:no-store
: my plugin is not trigger on each GetCapabilities request
Force chrome to not use disk cache by adding a new parameter in the GetCapabilities url &t=new Date().getTime()
: the querry is not responding frome the disk cache any more but my plugin is not trigger on each GetCapabilities request
est-py-qgis-server-qgis-server-1 | 2023-04-12 10:37:15,057 WARNING [31] Qgis: : SUCCESS - plugin foo initialized
test-py-qgis-server-qgis-server-1 | 2023-04-12 10:37:15,057 INFO [31] Loaded plugin foo
...
curl
to issue direct requests to py-qgis-server and check headers.In debug mode, you must have something like:
test-py-qgis-server-qgis-server-1 | 2023-04-12 10:39:14,890 DEBUG [31] Qgis: Server: REQUEST:GetCapabilities
test-py-qgis-server-qgis-server-1 | 2023-04-12 10:39:14,890 DEBUG [31] Qgis: Server: SERVICE:WFS
...
The above tell you that the request has reached Qgis server instance. If you get this and your plugin is loaded then your plugin must be called. Otherwise there is something wrong with your plugin.
Alternatively you may setup the management server mode with the MANAGEMENT_ENABLED option.
Then go to http://localhost:19876/plugins
to check the status of the plugins.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
How to force py-qgis-server to not use cache for GetCapabilities request ? Or for all request if it is not possible
Thanks