QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsServerCacheManager Class Reference

A helper class that centralizes caches accesses given by all the server cache filter plugins. More...

#include <qgsservercachemanager.h>

Public Member Functions

 QgsServerCacheManager (const QgsServerCacheManager &copy)
 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...
 
QgsServerCacheManageroperator= (const QgsServerCacheManager &copy)
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsServerCacheManager() [1/2]

QgsServerCacheManager::QgsServerCacheManager ( const QgsServerSettings settings = QgsServerSettings())

Constructor.

Definition at line 24 of file qgsservercachemanager.cpp.

◆ QgsServerCacheManager() [2/2]

QgsServerCacheManager::QgsServerCacheManager ( const QgsServerCacheManager copy)

Copy constructor.

Definition at line 30 of file qgsservercachemanager.cpp.

◆ ~QgsServerCacheManager()

QgsServerCacheManager::~QgsServerCacheManager ( )

Destructor.

Definition at line 56 of file qgsservercachemanager.cpp.

Member Function Documentation

◆ deleteCachedDocument()

bool QgsServerCacheManager::deleteCachedDocument ( const QgsProject project,
const QgsServerRequest request,
QgsAccessControl accessControl 
) const

Deletes the cached document.

Parameters
projectthe project used to generate the document to provide path
requestthe request used to generate the document to provider parameters or data
accessControlthe 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
projectthe 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()

bool QgsServerCacheManager::deleteCachedImage ( const QgsProject project,
const QgsServerRequest request,
QgsAccessControl accessControl 
) const

Deletes the cached image.

Parameters
projectthe project used to generate the image to provide path
requestthe request used to generate the image to provider parameters or data
accessControlthe 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
projectthe 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()

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.

Parameters
docthe document to update by content found in cache
projectthe project used to generate the document to provide path
requestthe request used to generate the document to provider parameters or data
accessControlthe 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()

QByteArray QgsServerCacheManager::getCachedImage ( const QgsProject project,
const QgsServerRequest request,
QgsAccessControl accessControl 
) const

Returns cached image (or 0 if image not in cache) like tiles.

Parameters
projectthe project used to generate the image to provide path
requestthe request used to generate the image to provider parameters or data
accessControlthe 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=()

QgsServerCacheManager & QgsServerCacheManager::operator= ( const QgsServerCacheManager copy)

Assignment operator.

Definition at line 43 of file qgsservercachemanager.cpp.

◆ registerServerCache()

void QgsServerCacheManager::registerServerCache ( QgsServerCacheFilter serverCache,
int  priority = 0 
)

Register a server cache filter.

Parameters
serverCachethe server cache to add
prioritythe priority used to define the order

Definition at line 206 of file qgsservercachemanager.cpp.

◆ setCachedDocument()

bool QgsServerCacheManager::setCachedDocument ( const QDomDocument *  doc,
const QgsProject project,
const QgsServerRequest request,
QgsAccessControl accessControl 
) const

Updates or inserts the document in cache like capabilities.

Parameters
docthe document to cache
projectthe project used to generate the document to provide path
requestthe request used to generate the document to provider parameters or data
accessControlthe 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()

bool QgsServerCacheManager::setCachedImage ( const QByteArray *  img,
const QgsProject project,
const QgsServerRequest request,
QgsAccessControl accessControl 
) const

Updates or inserts the image in cache like tiles.

Parameters
imgthe image to cache
projectthe project used to generate the image to provide path
requestthe request used to generate the image to provider parameters or data
accessControlthe 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: