QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
A helper class that centralizes caches accesses given by all the server cache filter plugins. More...
#include <qgsservercachemanager.h>
Public Member Functions | |
QgsServerCacheManager () | |
Constructor. More... | |
QgsServerCacheManager (const QgsServerCacheManager ©) | |
Copy constructor. More... | |
~QgsServerCacheManager () | |
Destructor. More... | |
bool | deleteCachedDocument (const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const |
Deletes the cached document. More... | |
bool | deleteCachedDocuments (const QgsProject *project) const |
Deletes all cached documents for a QGIS project. More... | |
bool | deleteCachedImage (const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const |
Deletes the cached image. More... | |
bool | deleteCachedImages (const QgsProject *project) const |
Deletes all cached images for a QGIS project. More... | |
bool | getCachedDocument (QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const |
Returns cached document (or 0 if document not in cache) like capabilities. More... | |
QByteArray | getCachedImage (const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const |
Returns cached image (or 0 if image not in cache) like tiles. More... | |
QgsServerCacheManager & | operator= (const QgsServerCacheManager ©) |
Assignment operator. More... | |
void | registerServerCache (QgsServerCacheFilter *serverCache, int priority=0) |
Register a server cache filter. More... | |
bool | setCachedDocument (const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const |
Updates or inserts the document in cache like capabilities. More... | |
bool | setCachedImage (const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl) const |
Updates or inserts the image in cache like tiles. More... | |
A helper class that centralizes caches accesses given by all the server cache filter plugins.
Definition at line 40 of file qgsservercachemanager.h.
QgsServerCacheManager::QgsServerCacheManager | ( | ) |
Constructor.
Definition at line 21 of file qgsservercachemanager.cpp.
QgsServerCacheManager::QgsServerCacheManager | ( | const QgsServerCacheManager & | copy | ) |
Copy constructor.
Definition at line 26 of file qgsservercachemanager.cpp.
QgsServerCacheManager::~QgsServerCacheManager | ( | ) |
Destructor.
Definition at line 51 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::deleteCachedDocument | ( | const QgsProject * | project, |
const QgsServerRequest & | request, | ||
QgsAccessControl * | accessControl | ||
) | const |
Deletes the cached document.
project | the project used to generate the document to provide path |
request | the request used to generate the document to provider parameters or data |
accessControl | the access control to identify different documents for the same request provided by server interface |
true
if the document has been deleted Definition at line 110 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::deleteCachedDocuments | ( | const QgsProject * | project | ) | const |
Deletes all cached documents for a QGIS project.
project | the project used to generate the document to provide path |
true
if the document has been deleted Definition at line 126 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::deleteCachedImage | ( | const QgsProject * | project, |
const QgsServerRequest & | request, | ||
QgsAccessControl * | accessControl | ||
) | const |
Deletes the cached image.
project | the project used to generate the image to provide path |
request | the request used to generate the image to provider parameters or data |
accessControl | the access control to identify different documents for the same request provided by server interface |
true
if the image has been deleted Definition at line 172 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::deleteCachedImages | ( | const QgsProject * | project | ) | const |
Deletes all cached images for a QGIS project.
project | the project used to generate the images to provide path |
true
if the images have been deleted Definition at line 188 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::getCachedDocument | ( | QDomDocument * | doc, |
const QgsProject * | project, | ||
const QgsServerRequest & | request, | ||
QgsAccessControl * | accessControl | ||
) | const |
Returns cached document (or 0 if document not in cache) like capabilities.
doc | the document to update by content found in cache |
project | the project used to generate the document to provide path |
request | the request used to generate the document to provider parameters or data |
accessControl | the access control to identify different documents for the same request provided by server interface |
true
if the document has been found in cache and the document's content set Definition at line 56 of file qgsservercachemanager.cpp.
QByteArray QgsServerCacheManager::getCachedImage | ( | const QgsProject * | project, |
const QgsServerRequest & | request, | ||
QgsAccessControl * | accessControl | ||
) | const |
Returns cached image (or 0 if image not in cache) like tiles.
project | the project used to generate the image to provide path |
request | the request used to generate the image to provider parameters or data |
accessControl | the access control to identify different documents for the same request provided by server interface |
Definition at line 139 of file qgsservercachemanager.cpp.
QgsServerCacheManager & QgsServerCacheManager::operator= | ( | const QgsServerCacheManager & | copy | ) |
Assignment operator.
Definition at line 38 of file qgsservercachemanager.cpp.
void QgsServerCacheManager::registerServerCache | ( | QgsServerCacheFilter * | serverCache, |
int | priority = 0 |
||
) |
Register a server cache filter.
serverCache | the server cache to add |
priority | the priority used to define the order |
Definition at line 201 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::setCachedDocument | ( | const QDomDocument * | doc, |
const QgsProject * | project, | ||
const QgsServerRequest & | request, | ||
QgsAccessControl * | accessControl | ||
) | const |
Updates or inserts the document in cache like capabilities.
doc | the document to cache |
project | the project used to generate the document to provide path |
request | the request used to generate the document to provider parameters or data |
accessControl | the access control to identify different documents for the same request provided by server interface |
true
if the document has been cached Definition at line 89 of file qgsservercachemanager.cpp.
bool QgsServerCacheManager::setCachedImage | ( | const QByteArray * | img, |
const QgsProject * | project, | ||
const QgsServerRequest & | request, | ||
QgsAccessControl * | accessControl | ||
) | const |
Updates or inserts the image in cache like tiles.
img | the image to cache |
project | the project used to generate the image to provide path |
request | the request used to generate the image to provider parameters or data |
accessControl | the access control to identify different documents for the same request provided by server interface |
true
if the image has been cached Definition at line 156 of file qgsservercachemanager.cpp.