Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7545593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:58:13+00:00 2026-05-30T08:58:13+00:00

There are web attributes (void QWebSettings::setAttribute(WebAttribute attribute, bool on)): QWebSettings::LocalStorageDatabaseEnabled QWebSettings::OfflineWebApplicationCacheEnabled QWebSettings::OfflineStorageDatabaseEnabled There are

  • 0

There are web attributes (void QWebSettings::setAttribute(WebAttribute attribute, bool on)):

QWebSettings::LocalStorageDatabaseEnabled
QWebSettings::OfflineWebApplicationCacheEnabled
QWebSettings::OfflineStorageDatabaseEnabled

There are also methods:

void QWebSettings::enablePersistentStorage(const QString &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 &path)
void QWebSettings::setOfflineWebApplicationCachePath(const QString &path)
void QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)

And there is QNetworkDiskCache which can be used with QNetworkAccessManager:

QNetworkDiskCache *diskCache = new QNetworkDiskCache(this);
QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
diskCache->setCacheDirectory(location);
networkAccessManager->setCache(diskCache);

It has also couple of methods:

void setCacheDirectory(const QString &cacheDir)
void setMaximumCacheSize(qint64 size)

How should I implement caching properly with this confusing API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:58:14+00:00Added an answer on May 30, 2026 at 8:58 am
    • The page cache referred to is the WebKit page-cache – see
      http://www.webkit.org/blog/427/webkit-page-cache-i-the-basics/. This
      is an in-memory cache to speed up Back/Forward operations in the
      browser.
    • setObjectCacheCapacities refers to WebKit’s in-memory cache.
    • QNetworkDiskCache is, as the name suggests, a disk cache that Qt could use as an alternative to fetching resources from the network.
    • The offline web app / local storage settings are for the HTML local storage and offline web app features.

    When loading pages, there are a number of levels of caching involved, from fastest to slowest:

    1. WebKit’s internal in-memory caches (the page and object caches)
    2. Qt’s disk cache of network resource (QNetworkDiskCache)
    3. Any local proxy caching on the user’s network or system
    4. The multiple levels of caching that the site serving the page uses (eg. serving static resources from content delivery networks, Squid caches)

    (3) and (4) are out of your control, (1) is enabled by default, so the only thing you potentially need to do is enable (2).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking at the processmodel element in the Web.Config there are two attributes. maxWorkerThreads=25 maxIoThreads=25
I have a web application with bunch of HTML code. There are some style-attributes
Is there a web service of some sort (or any other way) to pull
Are there any Web page designing software out there that allow me to drag
Is there a web (i.e. html) text editor with autocomplete? Let's say I want
Is there a web-service/API that will provide information on who the US State and
Are there any web search APIs or search engines that allow automated queries?
Is there a web site or tool that will convert a piece PHP code
I see on the web there are a lot of questions about caching ASP.Net,
There are several web applications which allow you to send photos from your mobile

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.