A helper class that centralizes caches accesses given by all the server cache filter plugins.
More...
#include <qgsservercachemanager.h>
|
| QgsServerCacheManager (const QgsServerCacheManager ©) |
| Copy constructor. More...
|
|
| QgsServerCacheManager (const QgsServerSettings &settings=QgsServerSettings()) |
| 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.
- Since
- QGIS 3.4
Definition at line 41 of file qgsservercachemanager.h.
◆ QgsServerCacheManager() [1/2]
◆ QgsServerCacheManager() [2/2]
◆ ~QgsServerCacheManager()
QgsServerCacheManager::~QgsServerCacheManager |
( |
| ) |
|
◆ deleteCachedDocument()
Deletes the cached document.
- Parameters
-
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 |
- Returns
true
if the document has been deleted
Definition at line 115 of file qgsservercachemanager.cpp.
◆ deleteCachedDocuments()
bool QgsServerCacheManager::deleteCachedDocuments |
( |
const QgsProject * |
project | ) |
const |
Deletes all cached documents for a QGIS project.
- Parameters
-
project | the project used to generate the document to provide path |
- Returns
true
if the document has been deleted
Definition at line 131 of file qgsservercachemanager.cpp.
◆ deleteCachedImage()
Deletes the cached image.
- Parameters
-
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 |
- Returns
true
if the image has been deleted
Definition at line 177 of file qgsservercachemanager.cpp.
◆ deleteCachedImages()
bool QgsServerCacheManager::deleteCachedImages |
( |
const QgsProject * |
project | ) |
const |
Deletes all cached images for a QGIS project.
- Parameters
-
project | the project used to generate the images to provide path |
- Returns
true
if the images have been deleted
Definition at line 193 of file qgsservercachemanager.cpp.
◆ getCachedDocument()
Returns cached document (or 0 if document not in cache) like capabilities.
- Parameters
-
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 |
- Returns
true
if the document has been found in cache and the document's content set
Definition at line 61 of file qgsservercachemanager.cpp.
◆ getCachedImage()
Returns cached image (or 0 if image not in cache) like tiles.
- Parameters
-
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 |
- Returns
- the cached image or 0 if no corresponding image found
Definition at line 144 of file qgsservercachemanager.cpp.
◆ operator=()
◆ registerServerCache()
void QgsServerCacheManager::registerServerCache |
( |
QgsServerCacheFilter * |
serverCache, |
|
|
int |
priority = 0 |
|
) |
| |
Register a server cache filter.
- Parameters
-
serverCache | the server cache to add |
priority | the priority used to define the order |
Definition at line 206 of file qgsservercachemanager.cpp.
◆ setCachedDocument()
Updates or inserts the document in cache like capabilities.
- Parameters
-
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 |
- Returns
true
if the document has been cached
Definition at line 94 of file qgsservercachemanager.cpp.
◆ setCachedImage()
Updates or inserts the image in cache like tiles.
- Parameters
-
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 |
- Returns
true
if the image has been cached
Definition at line 161 of file qgsservercachemanager.cpp.
The documentation for this class was generated from the following files: