内容表

上一话题

QNetworkAddressEntry

下一话题

QNetworkConfiguration

QNetworkCacheMetaData

QNetworkCacheMetaData class provides cache information. 更多

Inheritance diagram of PySide2.QtNetwork.QNetworkCacheMetaData

概要

函数

详细描述

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.

class QNetworkCacheMetaData

QNetworkCacheMetaData(other)

param other

QNetworkCacheMetaData

Constructs an invalid network cache meta data.

另请参阅

isValid()

构造副本为 other QNetworkCacheMetaData .

PySide2.QtNetwork.QNetworkCacheMetaData. attributes ( )
返回类型

Returns all the attributes stored with this cache item.

另请参阅

setAttributes() 属性

PySide2.QtNetwork.QNetworkCacheMetaData. expirationDate ( )
返回类型

QDateTime

Returns the date and time when the meta data expires.

PySide2.QtNetwork.QNetworkCacheMetaData. isValid ( )
返回类型

bool

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

PySide2.QtNetwork.QNetworkCacheMetaData. lastModified ( )
返回类型

QDateTime

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

另请参阅

setLastModified()

PySide2.QtNetwork.QNetworkCacheMetaData. __ne__ ( other )
参数

other QNetworkCacheMetaData

返回类型

bool

返回 true if this meta data is not equal to the other meta data; otherwise returns false .

另请参阅

operator==()

PySide2.QtNetwork.QNetworkCacheMetaData. __eq__ ( other )
参数

other QNetworkCacheMetaData

返回类型

bool

返回 true if this meta data is equal to the other meta data; otherwise returns false .

另请参阅

operator!=()

PySide2.QtNetwork.QNetworkCacheMetaData. rawHeaders ( )
返回类型

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.

另请参阅

setRawHeaders()

PySide2.QtNetwork.QNetworkCacheMetaData. 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 with Cache-control set to no-store or any https document that doesn’t have “Cache-control: public” set will set the to false.

另请参阅

setSaveToDisk()

PySide2.QtNetwork.QNetworkCacheMetaData. setAttributes ( attributes )
参数

attributes

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

PySide2.QtNetwork.QNetworkCacheMetaData. setExpirationDate ( dateTime )
参数

dateTime QDateTime

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

另请参阅

expirationDate()

PySide2.QtNetwork.QNetworkCacheMetaData. setLastModified ( dateTime )
参数

dateTime QDateTime

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

另请参阅

lastModified()

PySide2.QtNetwork.QNetworkCacheMetaData. setRawHeaders ( headers )
参数

headers

Sets the raw headers to list .

另请参阅

rawHeaders()

PySide2.QtNetwork.QNetworkCacheMetaData. setSaveToDisk ( allow )
参数

allow bool

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

另请参阅

saveToDisk()

PySide2.QtNetwork.QNetworkCacheMetaData. setUrl ( url )
参数

url QUrl

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

The password and fragment are removed from the url.

另请参阅

url()

PySide2.QtNetwork.QNetworkCacheMetaData. swap ( other )
参数

other QNetworkCacheMetaData

Swaps this metadata instance with other 。此函数非常快,且从不失败。

PySide2.QtNetwork.QNetworkCacheMetaData. url ( )
返回类型

QUrl

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

另请参阅

setUrl()