GNOME Bugzilla – Bug 700311
Use a different cache per plugin
Last modified: 2013-05-15 19:21:21 UTC
As each plugin uses its own SoupSession, grilo must set a different SoupCache for each SoupSession. Being a SoupSessionFeature, the SoupCache can only be associated to a single SoupSession. This was making the plugins to cache stuff randomly as only the first one to setup its session will use the cache.
Created attachment 244201 [details] [review] Patch
Created attachment 244202 [details] [review] test-ui: shutdown plugins on exit Let the plugins clear their caches on program exit. As it's done in the plugin finalize we have to unload the plugins from the registry first.
Are you missing some patch? I see patch 2/3 and 3/3, but not 1/3.
commit 5140418233f2f8822c7e30e8353a155bb0a91aa7 Author: Sergio Villar Senin <svillar@igalia.com> Date: Tue May 14 17:34:47 2013 +0200 test-ui: shutdown plugins on exit Unload plugins on program exit. The registry will call the finalize method on each plugin before the program ends to allow things like clearing the plugins HTTP cache. https://bugzilla.gnome.org/show_bug.cgi?id=700311 tools/grilo-test-ui/main.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 23fe14ed52ed620ded17d453419d560d314791e2 Author: Sergio Villar Senin <svillar@igalia.com> Date: Tue May 14 17:34:25 2013 +0200 net: use a different cache per session The SoupCache is a SoupSessionFeature so it could only be attached to a single SoupSession. A new SoupCache is created for each SoupSession. Also the cache contents are now destroyed on finalize. https://bugzilla.gnome.org/show_bug.cgi?id=700311 libs/net/grl-net-soup-unstable.c | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) Attachment 244202 [details] pushed as 5140418 - test-ui: shutdown plugins on exit