QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
A custom cache for handling the storage and retrieval of HTTP range requests on disk. More...
#include <qgsrangerequestcache.h>
Public Member Functions | |
QgsRangeRequestCache () | |
Constructor. More... | |
void | clear () |
Clears the cache removing all of the files. More... | |
QByteArray | entry (const QNetworkRequest &request) |
Returns the range request data stored in the cache and an empty byte array if the data is not in the cache. More... | |
QString | error () const |
Returns the last error that occurred when manipulating the cache. More... | |
bool | hasEntry (const QNetworkRequest &request) |
Checks whether the range request exists in the cache. More... | |
void | registerEntry (const QNetworkRequest &request, QByteArray data) |
Adds the range request data into the cache. More... | |
bool | setCacheDirectory (const QString &path) |
Set the Cache Directory object. More... | |
void | setCacheSize (qint64 maxBytes) |
Sets the cache size. More... | |
Friends | |
class | TestQgsCopcProvider |
A custom cache for handling the storage and retrieval of HTTP range requests on disk.
Definition at line 43 of file qgsrangerequestcache.h.
QgsRangeRequestCache::QgsRangeRequestCache | ( | ) |
Constructor.
Definition at line 25 of file qgsrangerequestcache.cpp.
void QgsRangeRequestCache::clear | ( | ) |
Clears the cache removing all of the files.
Definition at line 50 of file qgsrangerequestcache.cpp.
QByteArray QgsRangeRequestCache::entry | ( | const QNetworkRequest & | request | ) |
Returns the range request data stored in the cache and an empty byte array if the data is not in the cache.
Definition at line 30 of file qgsrangerequestcache.cpp.
|
inline |
Returns the last error that occurred when manipulating the cache.
Definition at line 69 of file qgsrangerequestcache.h.
bool QgsRangeRequestCache::hasEntry | ( | const QNetworkRequest & | request | ) |
Checks whether the range request exists in the cache.
Definition at line 37 of file qgsrangerequestcache.cpp.
void QgsRangeRequestCache::registerEntry | ( | const QNetworkRequest & | request, |
QByteArray | data | ||
) |
Adds the range request data into the cache.
Definition at line 43 of file qgsrangerequestcache.cpp.
bool QgsRangeRequestCache::setCacheDirectory | ( | const QString & | path | ) |
Set the Cache Directory object.
Returns whether the cache directory was set properly
Definition at line 59 of file qgsrangerequestcache.cpp.
void QgsRangeRequestCache::setCacheSize | ( | qint64 | maxBytes | ) |
Sets the cache size.
Definition at line 76 of file qgsrangerequestcache.cpp.
|
friend |
Definition at line 71 of file qgsrangerequestcache.h.