From f5ed13b1e2d20ca49adb6fa378faee14bece16a0 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 10 Dec 2015 07:05:29 -0800 Subject: Add function to clear data from the cache It marks the entries of the current cache backend for deletion and starts to remove them. Task-number: QTBUG-48177 Change-Id: I85ec25048ff5429976f1b2dcacd74666bdbe6624 Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebengineprofile.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/webengine/api/qquickwebengineprofile.cpp') diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 0c3f7400b..6df16bf54 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -436,6 +436,20 @@ QWebEngineCookieStore *QQuickWebEngineProfile::cookieStore() const return d->browserContext()->cookieStore(); } +/*! + \qmlmethod void WebEngineProfile::clearHttpCache() + \since QtWebEngine 1.3 + + Removes the profile's cache entries. + + \sa WebEngineProfile::cachePath +*/ +void QQuickWebEngineProfile::clearHttpCache() +{ + Q_D(QQuickWebEngineProfile); + d->browserContext()->clearHttpCache(); +} + QQuickWebEngineSettings *QQuickWebEngineProfile::settings() const { const Q_D(QQuickWebEngineProfile); -- cgit v1.2.1