Home · All Classes · Modules

QNetworkCacheMetaData Class Reference
[QtNetwork module]

The QNetworkCacheMetaData class provides cache information. More...

Methods

Special Methods


Detailed 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.


Method Documentation

QNetworkCacheMetaData.__init__ (self)

Constructs an invalid network cache meta data.

See also isValid().

QNetworkCacheMetaData.__init__ (self, QNetworkCacheMetaData other)

Constructs a copy of the other QNetworkCacheMetaData.

dict-of-QNetworkRequest.Attribute-QVariant QNetworkCacheMetaData.attributes (self)

Returns all the attributes stored with this cache item.

This function was introduced in Qt 4.6.

See also setAttributes() and QNetworkRequest.Attribute.

QDateTime QNetworkCacheMetaData.expirationDate (self)

Returns the date and time when the meta data expires.

See also setExpirationDate().

bool QNetworkCacheMetaData.isValid (self)

Returns true if this network cache meta data has attributes that have been set otherwise false.

QDateTime QNetworkCacheMetaData.lastModified (self)

Returns the date and time when the meta data was last modified.

See also setLastModified().

list-of-tuple-of-QByteArray-QByteArray QNetworkCacheMetaData.rawHeaders (self)

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().

bool QNetworkCacheMetaData.saveToDisk (self)

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 saveToDisk to false.

See also setSaveToDisk().

QNetworkCacheMetaData.setAttributes (self, dict-of-QNetworkRequest.Attribute-QVariant attributes)

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

This function was introduced in Qt 4.6.

See also attributes() and QNetworkRequest.setAttribute().

QNetworkCacheMetaData.setExpirationDate (self, QDateTime dateTime)

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

See also expirationDate().

QNetworkCacheMetaData.setLastModified (self, QDateTime dateTime)

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

See also lastModified().

QNetworkCacheMetaData.setRawHeaders (self, list-of-tuple-of-QByteArray-QByteArray headers)

Sets the raw headers to list.

See also rawHeaders().

QNetworkCacheMetaData.setSaveToDisk (self, bool allow)

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

See also saveToDisk().

QNetworkCacheMetaData.setUrl (self, QUrl url)

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

The password and fragment are removed from the url.

See also url().

QUrl QNetworkCacheMetaData.url (self)

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

See also setUrl().

bool QNetworkCacheMetaData.__eq__ (self, QNetworkCacheMetaData other)

bool QNetworkCacheMetaData.__ne__ (self, QNetworkCacheMetaData other)


PyQt 4.11.4 for X11Copyright © Riverbank Computing Ltd and The Qt Company 2015Qt 4.8.7