Class: QgsConfigCache¶
- class qgis.server.QgsConfigCache¶
Bases:
PyQt5.QtCore.QObject
Cache for server configuration.
New in version 2.8.
QgsConfigCache(settings:
QgsServerSettings
) Initialize from settingsMethods
Initialize from settings.
Returns the current instance.
If the project is not cached yet, then the project is read from the path.
Remove all changed cache entries
Remove cache entry
Removes an entry from cache.
Returns the name of the current strategy
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- initialize(settings: QgsServerSettings)¶
Initialize from settings.
This method must be called prior any call to QgsConfigCache.instance
- Parameters:
settings (QgsServerSettings) –
- instance() QgsConfigCache ¶
Returns the current instance.
- Return type:
- isSignalConnected(self, QMetaMethod) bool ¶
- project(self, path: str, settings: QgsServerSettings = None) QgsProject ¶
If the project is not cached yet, then the project is read from the path. If the project is not available, then
None
is returned. If the project contains any bad layer it is considered unavailable unless the server configuration variable QGIS_SERVER_IGNORE_BAD_LAYERS passed in the optional settings argument is set toTrue
(the default value isFalse
).- Parameters:
path (str) – the filename of the QGIS project
settings (
QgsServerSettings
= None) – QGIS server settings
- Return type:
- Returns:
the project or
None
if an error happened
New in version 3.0.
- receivers(self, PYQT_SIGNAL) int ¶
- removeChangedEntries(self)¶
Remove all changed cache entries
- removeChangedEntry(self, path: str)¶
Remove cache entry
- Parameters:
path (str) –
- removeEntry(self, path: str)¶
Removes an entry from cache.
- Parameters:
path (str) – The path of the project
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- strategyName(self) str ¶
Returns the name of the current strategy
New in version 3.26.
- Return type:
str
- timerEvent(self, QTimerEvent)¶