QNetworkCacheMetaData Class Reference

[ QtNetwork module]

The QNetworkCacheMetaData class provides cache information. 更多...

方法

Special Methods


详细描述

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.


方法文档编制

QNetworkCacheMetaData.__init__ ( self )

Constructs an invalid network cache meta data.

另请参阅 isValid ().

QNetworkCacheMetaData.__init__ ( self , QNetworkCacheMetaData   other )

构造副本为 other QNetworkCacheMetaData .

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

Returns all the attributes stored with this cache item.

该函数在 Qt 4.6 引入。

另请参阅 setAttributes () 和 QNetworkRequest.Attribute .

QDateTime QNetworkCacheMetaData.expirationDate ( self )

Returns the date and time when the meta data expires.

另请参阅 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.

另请参阅 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.

另请参阅 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.

另请参阅 setSaveToDisk ().

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

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

该函数在 Qt 4.6 引入。

另请参阅 attributes () 和 QNetworkRequest.setAttribute ().

QNetworkCacheMetaData.setExpirationDate ( self , QDateTime   dateTime )

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

另请参阅 expirationDate ().

QNetworkCacheMetaData.setLastModified ( self , QDateTime   dateTime )

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

另请参阅 lastModified ().

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

Sets the raw headers to list .

另请参阅 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 .

另请参阅 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.

另请参阅 url ().

QUrl QNetworkCacheMetaData.url ( self )

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

另请参阅 setUrl ().

bool QNetworkCacheMetaData.__eq__ ( self , QNetworkCacheMetaData   other )

bool QNetworkCacheMetaData.__ne__ ( self , QNetworkCacheMetaData   other )