QNetworkCacheMetaDataclass provides cache information. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
attributes
()
def
expirationDate
()
def
isValid
()
def
lastModified
()
def
rawHeaders
()
def
saveToDisk
()
def
setAttributes
(attributes)
def
setExpirationDate
(dateTime)
def
setLastModified
(dateTime)
def
setRawHeaders
(headers)
def
setSaveToDisk
(allow)
def
setUrl
(url)
def
swap
(other)
def
url
()
QNetworkCacheMetaDataprovides 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.
QNetworkCacheMetaData
¶
QNetworkCacheMetaData(other)
- param other
Constructs an invalid network cache meta data.
另请参阅
构造副本为
other
QNetworkCacheMetaData
.
PySide2.QtNetwork.QNetworkCacheMetaData.
attributes
(
)
¶
Returns all the attributes stored with this cache item.
另请参阅
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.
另请参阅
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.
另请参阅
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.
另请参阅
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
.
另请参阅
PySide2.QtNetwork.QNetworkCacheMetaData.
setLastModified
(
dateTime
)
¶
dateTime
–
QDateTime
Sets the date and time when the meta data was last modified to
dateTime
.
另请参阅
PySide2.QtNetwork.QNetworkCacheMetaData.
setRawHeaders
(
headers
)
¶
headers –
Sets the raw headers to
list
.
另请参阅
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
.
另请参阅
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.
另请参阅
PySide2.QtNetwork.QNetworkCacheMetaData.
swap
(
other
)
¶
other
–
QNetworkCacheMetaData
Swaps this metadata instance with
other
。此函数非常快,且从不失败。