QNetworkCacheMetaData¶
- PyQt5.QtNetwork.QNetworkCacheMetaData
Description¶
The QNetworkCacheMetaData class provides cache information.
QNetworkCacheMetaData provides information about a cache file including the url, when it was last modified, when the cache file was created, headers for file and if the file should be saved onto a disk.
See also
Methods¶
- __init__()
Constructs an invalid network cache meta data.
See also
- __init__(QNetworkCacheMetaData)
Constructs a copy of the other QNetworkCacheMetaData.
- attributes() → Dict[Attribute, Any]
Returns all the attributes stored with this cache item.
See also
- __eq__(QNetworkCacheMetaData) → bool
TODO
- expirationDate() → QDateTime
Returns the date and time when the meta data expires.
See also
- isValid() → bool
Returns
true
if this network cache meta data has attributes that have been set otherwise false.
- lastModified() → QDateTime
Returns the date and time when the meta data was last modified.
See also
- __ne__(QNetworkCacheMetaData) → bool
TODO
- rawHeaders() → List[Tuple[QByteArray, QByteArray]]
Returns a list of all raw headers that are set in this meta data. The list is in the same order that the headers were set.
See also
- saveToDisk() → bool
Returns is this cache should be allowed to be stored on disk.
Some cache implementations can keep these cache items in memory for performance reasons, but for security reasons they should not be written to disk.
Specifically with http, documents marked with Pragma: no-cache, or have a Cache-control set to no-store or no-cache or any https document that doesn’t have “Cache-control: public” set will set the to false.
See also
- setAttributes(Dict[Attribute, Any])
Sets all attributes of this cache item to be the map attributes.
See also
- setExpirationDate(Union[QDateTime, datetime.datetime])
Sets the date and time when the meta data expires to dateTime.
See also
- setLastModified(Union[QDateTime, datetime.datetime])
Sets the date and time when the meta data was last modified to dateTime.
See also
- setRawHeaders(Iterable[Tuple[Union[QByteArray, bytes, bytearray], Union[QByteArray, bytes, bytearray]]])
Sets the raw headers to list.
See also
- setSaveToDisk(bool)
Sets whether this network cache meta data and associated content should be allowed to be stored on disk to allow.
See also
- setUrl(QUrl)
Sets the URL this network cache meta data to be url.
The password and fragment are removed from the url.
See also
- swap(QNetworkCacheMetaData)
TODO