QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSNETWORKDISKCACHE_H
19 #define QGSNETWORKDISKCACHE_H
23 #include <QNetworkDiskCache>
26 class QNetworkDiskCache;
30 class ExpirableNetworkDiskCache :
public QNetworkDiskCache
35 explicit ExpirableNetworkDiskCache( QObject *parent =
nullptr ) : QNetworkDiskCache( parent ) {}
36 qint64 runExpire() {
return QNetworkDiskCache::expire(); }
67 QNetworkCacheMetaData
metaData(
const QUrl &url )
override;
73 QIODevice *
data(
const QUrl &url )
override;
76 bool remove(
const QUrl &url )
override;
85 void insert( QIODevice *device )
override;
88 QNetworkCacheMetaData
fileMetaData(
const QString &fileName )
const;
92 void clear()
override;
101 static ExpirableNetworkDiskCache sDiskCache;
102 static QMutex sDiskCacheMutex;
107 #endif // QGSNETWORKDISKCACHE_H
Wrapper implementation of QNetworkDiskCache with all methods guarded by a mutex soly for internal use...
QString cacheDirectory() const
QIODevice * prepare(const QNetworkCacheMetaData &metaData) override
QNetworkCacheMetaData metaData(const QUrl &url) override
void setMaximumCacheSize(qint64 size)
void setCacheDirectory(const QString &cacheDir)
QNetworkCacheMetaData fileMetaData(const QString &fileName) const
void updateMetaData(const QNetworkCacheMetaData &metaData) override
network access manager for QGIS
qint64 maximumCacheSize() const
qint64 cacheSize() const override
QIODevice * data(const QUrl &url) override
void insert(QIODevice *device) override
bool remove(const QUrl &url) override