diff options
author | Siddharth Mathur <siddharth.mathur@nokia.com> | 2010-03-05 21:52:51 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2011-04-01 14:02:04 (GMT) |
commit | bbc4cf1bad3c40fce3c42cf74409cdc163b04c01 (patch) | |
tree | 74e3b2265d1bb162167aa1bd745a3a695d596bd9 /src/network/access/qnetworkdiskcache_p.h | |
parent | db9a81e5cc0f18e4b6dae5edf2309c6fc90b9eb3 (diff) | |
download | Qt-bbc4cf1bad3c40fce3c42cf74409cdc163b04c01.zip Qt-bbc4cf1bad3c40fce3c42cf74409cdc163b04c01.tar.gz Qt-bbc4cf1bad3c40fce3c42cf74409cdc163b04c01.tar.bz2 |
QNetworkDiskCache: change file organization
Faster disk cache for mobile devices. Reduce file-system touching
operations and work around FAT performance issues. Features new
on-disk layout. Cached objects are now saved in multiple
subdirectories and filenames are shorter in length.
Merge-Request: 2505
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qnetworkdiskcache_p.h')
-rw-r--r-- | src/network/access/qnetworkdiskcache_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/access/qnetworkdiskcache_p.h b/src/network/access/qnetworkdiskcache_p.h index 8659066..13db04f 100644 --- a/src/network/access/qnetworkdiskcache_p.h +++ b/src/network/access/qnetworkdiskcache_p.h @@ -104,14 +104,17 @@ public: , currentCacheSize(-1) {} - QByteArray generateId(const QUrl &url) const; + static QString uniqueFileName(const QUrl &url); QString cacheFileName(const QUrl &url) const; QString tmpCacheFileName() const; bool removeFile(const QString &file); void storeItem(QCacheItem *item); + void prepareLayout(); + static quint32 crc32(const char *data, uint len); mutable QCacheItem lastItem; QString cacheDirectory; + QString dataDirectory; qint64 maximumCacheSize; qint64 currentCacheSize; |