18#ifndef QGSCONFIGCACHE_H 
   19#define QGSCONFIGCACHE_H 
   25#include <QFileSystemWatcher> 
   27#include <QDomDocument> 
   29#include "qgis_server.h" 
   49    virtual QString 
name() 
const = 0;
 
   98    void removeEntry( 
const QString &path );
 
  133    QDomDocument *xmlDocument( const QString &filePath );
 
  135    QCache<QString, QDomDocument> mXmlDocumentCache;
 
  142    void cacheProject( const QString &path, 
QgsProject *project );
 
  148    void removeChangedEntry( const QString &path );
 
  151    void removeChangedEntries();
 
  169    QString 
name()
 const override { 
return QStringLiteral( 
"filesystem" ); };
 
  178    void entryRemoved( 
const QString &path ) 
override;
 
  184    void entryInserted( 
const QString &path ) 
override;
 
  188    QFileSystemWatcher mFileSystemWatcher;
 
  208    QString 
name()
 const override { 
return QStringLiteral( 
"periodic" ); };
 
  216    void setCheckInterval( 
int msec );
 
  228    void entryRemoved( 
const QString &path ) 
override;
 
  234    void entryInserted( 
const QString &path ) 
override;
 
  258    QString 
name()
 const override { 
return QStringLiteral( 
"off" ); };
 
  267    void entryRemoved( 
const QString &path ) 
override;
 
  273    void entryInserted( 
const QString &path ) 
override;
 
Abstract base class for implementing cache invalidation strategy.
 
virtual void attach(QgsConfigCache *cache)=0
Attache cache to this strategy.
 
virtual void entryInserted(const QString &path)=0
Called when an entry is removed from cache.
 
virtual ~QgsAbstractCacheStrategy()=default
 
virtual QString name() const =0
The name of the strategy.
 
virtual void entryRemoved(const QString &path)=0
Called when an entry is removed from cache.
 
Cache for server configuration.
 
QString strategyName() const
Returns the name of the current strategy.
 
File system cache strategy for server configuration.
 
QString name() const override
The name of the strategy.
 
Null system cache strategy for server configuration, completely disable cache invalidation invalidati...
 
QgsNullCacheStrategy()=default
Creates a new null strategy.
 
QString name() const override
The name of the strategy.
 
Periodic system cache strategy for server configuration.
 
int checkInterval() const
Returns the invalidation check interval.
 
QString name() const override
The name of the strategy.
 
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
 
Provides a way to retrieve settings by prioritizing according to environment variables,...
 
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.