Bug 23883 - clear cache does not clear cache
Summary: clear cache does not clear cache
Status: RESOLVED FIXED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmproxy (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-04-07 21:48 UTC by Ferdinand Gassauer
Modified: 2020-12-15 20:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
the kcontrol part of the patch (1.35 KB, patch)
2002-10-27 13:31 UTC, Georg Robbers
Details
the .desktop file part of the patch (735 bytes, patch)
2002-10-27 13:34 UTC, Georg Robbers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand Gassauer 2001-04-07 21:46:09 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kcmkio
Version:           2.0 (using KDE 2.1.9 >= 20010310)
Severity:          normal
Installed from:    compiled sources
Compiler:          gcc version 2.95.2 19991024 (release)
OS:                Linux (i686) release 2.2.18
OS/Compiler notes: 

Hi!
I see all my files in 
~/.kde/share/apps/kio_http/cache
after I hit clear cache
cu ferdinand

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Daniel Molkentin 2002-09-19 16:47:01 UTC
The directory doesn't even exist anymore. Closing. 
Comment 2 Stefan A. Möller 2002-10-25 15:28:18 UTC
Apparently this bug has *not* been fixed. The directory now is     
~/.kde/share/cache/http/, but it still doesn't get cleared when hitting "clear     
cache". (KDE 3.0.4 / SuSE 7.3 RPMs)  
 
Comment 3 Dirk Mueller 2002-10-25 20:48:50 UTC
reopening 
Comment 4 Georg Robbers 2002-10-27 13:31:53 UTC
Created attachment 280 [details]
the kcontrol part of the patch
Comment 5 Georg Robbers 2002-10-27 13:34:54 UTC
Created attachment 281 [details]
the .desktop file part of the patch

It seems the implementation was simply forgotten, since kio_http_cache_cleaner
does have the command-line argument --clear-all.
This patch should fix it.
Comment 6 Daniel Molkentin 2003-01-07 18:51:18 UTC
Subject: kdebase/kcontrol/kio

CVS commit by danimo: 

Finally fix #23883 using a slightly adopted patch provided by Georg Robbers.

Thanks to KProcess::detach() we won't need the createServiceByPath() approach
to ensure kio_http_cache_cleaner continues even when the applet is closed.

CCMAIL:23883-done@bugs.kde.org


  M +16 -1     cache.cpp   1.25
  M +1 -0      cache.h   1.4


--- kdebase/kcontrol/kio/cache.cpp  #1.24:1.25
@@ -32,6 +32,8 @@
 #include <kdialog.h>
 #include <klocale.h>
-#include <dcopclient.h>
+#include <kprocess.h>
 #include <ksaveioconfig.h>
+
+#include <dcopclient.h>
 #include <kio/http_slave_defaults.h>
 
@@ -187,4 +189,8 @@ KCacheConfigDialog::KCacheConfigDialog( 
     connect( sb_max_cache_size, SIGNAL(valueChanged ( int )),this,
              SLOT(configChanged()));
+
+    connect( pb_clearCache, SIGNAL( clicked() ), this,
+             SLOT( slotClearCache() ) );
+
     // buddies
     lb_max_cache_size->setBuddy( sb_max_cache_size );
@@ -261,4 +267,13 @@ QString KCacheConfigDialog::quickHelp() 
                  "downloaded from the Internet, but rather retrieved from the "
                  "cache, which is a lot faster.</p>" );
+}
+
+void KCacheConfigDialog::slotClearCache()
+{
+    KProcess process;
+        process << "kio_http_cache_cleaner" << "--clear-all";
+        process.start(KProcess::DontCare);
+        // Cleaning up might take a while. Better detach.
+        process.detach();
 }
 

--- kdebase/kcontrol/kio/cache.h  #1.3:1.4
@@ -48,4 +48,5 @@ public:
 protected slots:
   void configChanged() { emit changed( true ); };
+  void slotClearCache();
 
 private:


Comment 7 jgrx1 2004-04-28 17:43:40 UTC
Using 3.1.1 on Suse.  Have the same problem.  Drop down on Sybase site shows data that is no longer correct.