GNOME Bugzilla – Bug 681509
SoupCache: remove unneeded fields from SoupCacheEntry and two other minor fixes
Last modified: 2012-08-20 10:33:45 UTC
We should move fields from the SoupCacheEntry to the writing fixture as they're only used during the storage process. There is no need to waste that memory because the cache entries are all loaded in memory Apart from that, I had for some time some patches for the SoupCache that I never uploaded to the bz. I'm attaching them also to this bug as different patches: - rework soup_cache_entry_remove()/soup_cache_entry_free(): the code always call the latter if the former succeeds, so it's better just to add the soup_cache_entry_free() call to the other function. - clear all the files in the cache directory when cleaning the cache, there shouldn't be files not associated to cache entries, but do it just in case we have bugs.
Created attachment 220776 [details] [review] Simplify the usage of soup_cache_entry_remove/free Call soup_cache_entry_remove_free() in soup_cache_entry_remove() as we always do it anyway.
Created attachment 220777 [details] [review] Move some SoupCacheEntry fields to the writing fixture Moved "current_writing_buffer", "got_body", "stream", and "error" to the writing fixture from SoupCacheEntry.
Created attachment 220778 [details] [review] Remove all files in the cache directory on soup_cache_clear() We remove all the files now, even those with no associated entry.
Just a couple of comments: * these changes were made on top of bug 665884 patches * I forgot to add the link to the bug to the commit messages
All patches landed 93ce2c0..2376ff2