QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Public Member Functions | Static Public Member Functions | List of all members
QgsConfigCache Class Reference

Cache for server configuration. More...

#include <qgsconfigcache.h>

Inheritance diagram for QgsConfigCache:
Inheritance graph
[legend]

Public Member Functions

const QgsProjectproject (const QString &path, const QgsServerSettings *settings=nullptr)
 If the project is not cached yet, then the project is read from the path. More...
 
void removeEntry (const QString &path)
 Removes an entry from cache. More...
 

Static Public Member Functions

static QgsConfigCacheinstance ()
 Returns the current instance. More...
 

Detailed Description

Cache for server configuration.

Since
QGIS 2.8

Definition at line 38 of file qgsconfigcache.h.

Member Function Documentation

◆ instance()

QgsConfigCache * QgsConfigCache::instance ( )
static

Returns the current instance.

Definition at line 26 of file qgsconfigcache.cpp.

◆ project()

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).

Parameters
paththe filename of the QGIS project
settingsQGIS server settings
Returns
the project or nullptr if an error happened
Since
QGIS 3.0

Definition at line 42 of file qgsconfigcache.cpp.

◆ removeEntry()

void QgsConfigCache::removeEntry ( const QString &  path)

Removes an entry from cache.

Parameters
pathThe path of the project

Definition at line 173 of file qgsconfigcache.cpp.


The documentation for this class was generated from the following files: