title: What is the difference between QWebkit QWebSettings cache and QNetworkManager QNetworkDiskCache?
body: <p>There are web attributes (void QWebSettings::setAttribute(WebAttribute attribute, bool on)):</p>
  
  <pre><code>QWebSettings::LocalStorageDatabaseEnabled
  QWebSettings::OfflineWebApplicationCacheEnabled
  QWebSettings::OfflineStorageDatabaseEnabled
  </code></pre>
  
  <p>There are also methods:</p>
  
  <pre><code>void QWebSettings::enablePersistentStorage(const QString &amp;path = QString())
  void QWebSettings::setMaximumPagesInCache(int pages)
  void QWebSettings::setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity)
  void QWebSettings::setOfflineStorageDefaultQuota(qint64 maximumSize)
  void QWebSettings::setOfflineStoragePath(const QString &amp;path)
  void QWebSettings::setOfflineWebApplicationCachePath(const QString &amp;path)
  void QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)
  </code></pre>
  
  <p>And there is QNetworkDiskCache which can be used with QNetworkAccessManager:</p>
  
  <pre><code>QNetworkDiskCache *diskCache = new QNetworkDiskCache(this);
  QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
  diskCache-&gt;setCacheDirectory(location);
  networkAccessManager-&gt;setCache(diskCache);
  </code></pre>
  
  <p>It has also couple of methods:</p>
  
  <pre><code>void setCacheDirectory(const QString &amp;cacheDir)
  void setMaximumCacheSize(qint64 size)
  </code></pre>
  
  <p>How should I implement caching properly with this confusing API?</p>