Re: [webkit-efl] RFC: Changes to the ewk_settings_cache_* API
I like what you want. I have one minor points for the renaming. IMO, ewk_view_setting_offline_app_cache_{get,set} also should be considered. Best Regards, Ryuan Choi ------- Original Message ------- Sender : Raphael Kubo da Costa<kubo@profusion.mobi> Date : 2011-11-08 01:17 (GMT+09:00) Title : [webkit-efl] RFC: Changes to the ewk_settings_cache_* API The ewk_settings_cache_* family of functions is quite messy right now. Some calls deal with Offline Web Applications (ewk_settings_cache_directory_path_{get,set}) and others deal with in-memory cache settings (ewk_settings_cache_enable_{get,set} and ewk_settings_cache_capacity_set). I see the following issues with the current situation: 1) Offline Web Applications are completely unrelated to the in-memory cache. The former handles the appcache part of the HTML5 spec, wheareas the latter just caches stylesheets, images and scripts in memory. Yet they both share the same function prefix. The current apidox also does not help at all (the term "offline web applications" is not even mentioned). 2) The exposed API to control the memory cache is redundant and insufficient. - It is insufficient because one cannot pass all parameters accepted by MemoryCache::setCapacities(). It also does not clear other in-memory caches, such as the page and the font caches. - It is redundant because if the user could specify all the parameters accepted by MemoryCache::setCapacities() there would be no need to have the getter and setter for MemoryCache::disabled(). Please tell me what you think of the following proposal: - Rename ewk_settings_cache_directory_path_{get,set} to ewk_settings_offline_web_applications_cache_directory_{get,set}. - Follow more closely what the Qt API does and have: - ewk_settings_cache_clear(Ewk_Cache_Clear_Mode mode) Ewk_Cache_Clear_Mode is an enum which currently has only one value: enum Ewk_Cache_Clear_Mode { EWK_CACHE_CLEAR_MODE_MEMORY_CACHE }; This one clears the memory cache, the page cache, the font cache and the cross-origin preflight cache, like Qt does. Once we have the necessary code to have a network disk-cache, we can add another item to the enum to make it possible to clear it as well. - ewk_settings_object_cache_capacity_set(minDeadBytes, maxDeadBytes, totalBytes) Pass the received parameters to MemoryCache::setCapacities(). If they are all 0, disable the in-memory object cache. -- Raphael Kubo da Costa ProFUSION embedded systems http://profusion.mobi _______________________________________________ webkit-efl mailing list webkit-efl@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-efl
Ryuan Choi <ryuan.choi@samsung.com> writes:
I like what you want.
I have one minor points for the renaming. IMO, ewk_view_setting_offline_app_cache_{get,set} also should be considered.
The abbreviation kind of makes sense, but there should be "path" or "directory" somewhere in the name. What do you guys think of having the following set of calls in ewk_settings from now on: == General purpose == * ewk_settings_repaint_throttling_set * ewk_settings_default_timer_interval_get == Web Database (aka WebSQL) == * ewk_settings_web_database_default_quota_get * ewk_settings_web_database_path_set * ewk_settings_web_database_path_get * ewk_settings_web_database_default_quota_set * ewk_settings_web_database_clear The last two are new functions. == Icon Database == * ewk_settings_icon_database_path_set * ewk_settings_icon_database_path_get * ewk_settings_icon_database_clear * ewk_settings_icon_database_icon_surface_get * ewk_settings_icon_database_icon_object_add == Offline Web Apps == * ewk_settings_offline_app_cache_path_get * ewk_settings_offline_app_cache_path_set These two replace ewk_settings_cache_directory_path_{get,set}. * ewk_settings_offline_app_cache_max_quota_get * ewk_settings_offline_app_cache_max_quota_set These functions are new. == In-Memory Cache == * ewk_settings_object_cache_capacity_set * ewk_settings_memory_cache_clear The former is a modified version of ewk_settings_cache_capacity_set, and the latter is a new function. ewk_settings_cache_enable_{get,set} would be removed. -- Raphael Kubo da Costa ProFUSION embedded systems http://profusion.mobi
Raphael Kubo da Costa <kubo@profusion.mobi> writes:
What do you guys think of having the following set of calls in ewk_settings from now on:
I forgot to mention that, even though it took much longer than expected to have all the patches reviewed, the proposed changes are all in trunk since a few weeks ago. The API ended up being changed a little, but all in all the documentation has been improved a lot and the function names make much more sense now. -- Raphael Kubo da Costa ProFUSION embedded systems http://profusion.mobi
participants (2)
-
Raphael Kubo da Costa
-
Ryuan Choi