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;
97 void removeEntry(
const QString &path );
122 QList<QgsProject *> projects()
const;
137 QDomDocument *xmlDocument( const QString &filePath );
139 QCache<QString, QDomDocument> mXmlDocumentCache;
140 QCache<QString, std::pair<QDateTime, std::unique_ptr<
QgsProject> > > mProjectCache;
146 void cacheProject( const QString &path,
QgsProject *project );
152 void removeChangedEntry( const QString &path );
155 void removeChangedEntries();
173 QString
name()
const override {
return QStringLiteral(
"filesystem" ); };
182 void entryRemoved(
const QString &path )
override;
188 void entryInserted(
const QString &path )
override;
192 QFileSystemWatcher mFileSystemWatcher;
212 QString
name()
const override {
return QStringLiteral(
"periodic" ); };
220 void setCheckInterval(
int msec );
232 void entryRemoved(
const QString &path )
override;
238 void entryInserted(
const QString &path )
override;
262 QString
name()
const override {
return QStringLiteral(
"off" ); };
271 void entryRemoved(
const QString &path )
override;
277 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,...