|
QGIS API Documentation 4.1.0-Master (5bf3c20f3c9)
|
Cache for server configuration. More...
#include <qgsconfigcache.h>

Public Slots | |
| void | removeChangedEntries () |
| Remove all changed cache entries. | |
| void | removeChangedEntry (const QString &path) |
| Remove cache entry. | |
Signals | |
| void | projectRemovedFromCache (const QString &path) |
| Emitted whenever a project is removed from the cache. | |
Public Member Functions | |
| QgsConfigCache (QgsAbstractCacheStrategy *strategy) | |
| Initialize with a strategy implementation. | |
| QgsConfigCache (QgsServerSettings *settings) | |
| Initialize from settings. | |
| const QgsProject * | project (const QString &path, const QgsServerSettings *settings=nullptr) |
| If the project is not cached yet, then the project is read from the path. | |
| QList< QgsProject * > | projects () const |
| Returns projects currently in cache. | |
| void | removeEntry (const QString &path) |
| Removes an entry from cache. | |
| QString | strategyName () const |
| Returns the name of the current strategy. | |
Static Public Member Functions | |
| static void | initialize (QgsServerSettings *settings) |
| Initialize from settings. | |
| static QgsConfigCache * | instance () |
| Returns the current instance. | |
Cache for server configuration.
Definition at line 78 of file qgsconfigcache.h.
| QgsConfigCache::QgsConfigCache | ( | QgsServerSettings * | settings | ) |
Initialize from settings.
Definition at line 79 of file qgsconfigcache.cpp.
| QgsConfigCache::QgsConfigCache | ( | QgsAbstractCacheStrategy * | strategy | ) |
Initialize with a strategy implementation.
Definition at line 86 of file qgsconfigcache.cpp.
|
static |
Initialize from settings.
This method must be called prior any call to QgsConfigCache::instance
Definition at line 58 of file qgsconfigcache.cpp.
|
static |
Returns the current instance.
Definition at line 69 of file qgsconfigcache.cpp.
| const QgsProject * QgsConfigCache::project | ( | const QString & | path, |
| const QgsServerSettings * | settings = nullptr ) |
If the project is not cached yet, then the project is read from the path.
If the project is not available, then nullptr 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 to true (the default value is false).
| path | the filename of the QGIS project |
| settings | QGIS server settings |
nullptr if an error happened Definition at line 96 of file qgsconfigcache.cpp.
|
signal |
Emitted whenever a project is removed from the cache.
| QList< QgsProject * > QgsConfigCache::projects | ( | ) | const |
Returns projects currently in cache.
Definition at line 204 of file qgsconfigcache.cpp.
|
slot |
Remove all changed cache entries.
Definition at line 282 of file qgsconfigcache.cpp.
|
slot |
Remove cache entry.
Definition at line 276 of file qgsconfigcache.cpp.
| void QgsConfigCache::removeEntry | ( | const QString & | path | ) |
Removes an entry from cache.
| path | The path of the project |
Definition at line 262 of file qgsconfigcache.cpp.
|
inline |
Returns the name of the current strategy.
Definition at line 117 of file qgsconfigcache.h.