GNOME Bugzilla – Bug 700310
Soup HTTP cache size incorrectly set
Last modified: 2013-05-15 16:58:32 UTC
SoupCache expects a size in bytes instead of in megabytes. As grilo sets 10 as cache size, this means that the cache will refuse to store almost any resource, as almost any of them is bigger than 10 bytes.
Created attachment 244200 [details] [review] Patch
Review of attachment 244200 [details] [review]: ::: libs/net/grl-net-soup-unstable.c @@ -107,3 @@ g_free (dir); - soup_cache_set_max_size (cache, cache_size); I see you have removed this line. Shouldn't you set up the maxsize of the cache when turning it up?
(In reply to comment #2) > Review of attachment 244200 [details] [review]: > > ::: libs/net/grl-net-soup-unstable.c > @@ -107,3 @@ > g_free (dir); > > - soup_cache_set_max_size (cache, cache_size); > > I see you have removed this line. Shouldn't you set up the maxsize of the cache > when turning it up? The cache is created by default with a limit of 50Mb, so you don't need to set any specific value when creating it.
(In reply to comment #3) > The cache is created by default with a limit of 50Mb, so you don't need to set > any specific value when creating it. The point is that our default cache size is 10Mb, not 50Mb.
(In reply to comment #4) > (In reply to comment #3) > > > The cache is created by default with a limit of 50Mb, so you don't need to set > > any specific value when creating it. > > > The point is that our default cache size is 10Mb, not 50Mb. There is no problem with that. The cache size is correctly set to 10Mb later. The size limit does not play any role until you either load a previous cache or you start processing requests. Correct me if I'm wrong but I think grilo sets that size before sending any request.
commit ab5db43b56f464d78a28f62202a6540e9d04c705 Author: Sergio Villar Senin <svillar@igalia.com> Date: Tue May 14 17:29:24 2013 +0200 net: properly set the SoupCache max size The SoupCache expects the maximum size to be specified in bytes instead of in megabytes. Also removed the call to soup_cache_set_max_size just after creating the cache as it is not needed. https://bugzilla.gnome.org/show_bug.cgi?id=700310 libs/net/grl-net-soup-unstable.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)