ignatenkobrain / gnome-news

GNU General Public License v3.0
19 stars 7 forks source link

cache manager #82

Closed ignatenkobrain closed 9 years ago

ignatenkobrain commented 9 years ago

we need some helper class which will help us cache images from webkitgtk, otherwise we will load the same images many times.

cc @mcatanzaro

mcatanzaro commented 9 years ago

Keep in mind that WebKit <=2.8 will use a soup cache to store images, and WebKit >=2.10 has a custom network cache, so if you load the same URL many times, it will be normally be retrieved from the Internet once and from disk subsequently. There is a (fairly small) size limit to the cache, of course, so this is not guaranteed, but it should work well enough.

See also: http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#webkit-web-context-set-cache-model

vrutkovs commented 9 years ago

WebKit caches images in ~/.cache/gnome-news/webkit here - do we really need this kind of classes?

ignatenkobrain commented 9 years ago

nothing more we want ;)