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.

Methods

__init__()

Constructs an invalid network cache meta data.

See also

isValid().


__init__(QNetworkCacheMetaData)

Constructs a copy of the other QNetworkCacheMetaData.


attributes() → Dict[Attribute, Any]

Returns all the attributes stored with this cache item.


__eq__(QNetworkCacheMetaData) → bool

TODO


expirationDate() → QDateTime

Returns the date and time when the meta data expires.


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

setLastModified().


__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

setRawHeaders().


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

setSaveToDisk().


setAttributes(Dict[Attribute, Any])

Sets all attributes of this cache item to be the map attributes.


setExpirationDate(Union[QDateTime, datetime.datetime])

Sets the date and time when the meta data expires to dateTime.

See also

expirationDate().


setLastModified(Union[QDateTime, datetime.datetime])

Sets the date and time when the meta data was last modified to dateTime.

See also

lastModified().


setRawHeaders(Iterable[Tuple[Union[QByteArray, bytes, bytearray], Union[QByteArray, bytes, bytearray]]])

Sets the raw headers to list.

See also

rawHeaders().


setSaveToDisk(bool)

Sets whether this network cache meta data and associated content should be allowed to be stored on disk to allow.

See also

saveToDisk().


setUrl(QUrl)

Sets the URL this network cache meta data to be url.

The password and fragment are removed from the url.

See also

url().


swap(QNetworkCacheMetaData)

TODO


url() → QUrl

Returns the URL this network cache meta data is referring to.

See also

setUrl().