History

The "Clear Disk Caches" command also deletes the HTTP cache used by QtWebEngine

Note that this only clears the HTTP cache (used for files), but not the directory used for persistent data such as Cookies, Local Databases, etc. There's no Qt API to do that. Fortunately, this directory should be small.

Oren Hurvitz committed 8 years ago

Commit d7ef7a01 parent ef163c85 files · +54 −1Browse files

Showing the changes to interface/src/Menu.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Menu.cpp+7−1
@@ -29,6 +29,8 @@ · 28 unmodified lines
2929 #include <VrMenu.h>
3030 #include <ScriptEngines.h>
3131 #include <MenuItemProperties.h>
32+#include <ui/types/FileTypeProfile.h>
33+#include <ui/types/HFWebEngineProfile.h>
3234
3335 #include "Application.h"
3436 #include "AccountManager.h"
@@ -635,8 +637,12 @@ Menu::Menu() { · 600 unmodified lines
635637
636638 action = addActionToQMenuAndActionHash(networkMenu, MenuOption::ClearDiskCaches);
637639 connect(action, &QAction::triggered, [] {
638− // This cache is cleared immediately
640+ // The following caches are cleared immediately
639641 DependencyManager::get<AssetClient>()->clearCache();
642+#ifndef Q_OS_ANDROID
643+ FileTypeProfile::clearCache();
644+ HFWebEngineProfile::clearCache();
645+#endif
640646
641647 // Clear the KTX cache on the next restart. It can't be cleared immediately because its files might be in use.
642648 Setting::Handle<int>(KTXCache::SETTING_VERSION_NAME, KTXCache::INVALID_VERSION).set(KTXCache::INVALID_VERSION);