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 );
124 QList<QgsProject *> projects()
const;
139 QDomDocument *xmlDocument( const QString &filePath );
141 QCache<QString, QDomDocument> mXmlDocumentCache;
148 void cacheProject( const QString &path,
QgsProject *project );
154 void removeChangedEntry( const QString &path );
157 void removeChangedEntries();
175 QString
name()
const override {
return QStringLiteral(
"filesystem" ); };
184 void entryRemoved(
const QString &path )
override;
190 void entryInserted(
const QString &path )
override;
194 QFileSystemWatcher mFileSystemWatcher;
214 QString
name()
const override {
return QStringLiteral(
"periodic" ); };
222 void setCheckInterval(
int msec );
234 void entryRemoved(
const QString &path )
override;
240 void entryInserted(
const QString &path )
override;
264 QString
name()
const override {
return QStringLiteral(
"off" ); };
273 void entryRemoved(
const QString &path )
override;
279 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.