[gnome-software] Remove the version from the cache name
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Remove the version from the cache name
- Date: Thu, 14 Sep 2017 11:43:36 +0000 (UTC)
commit 27771a72ddf7268c2e61c7801fe7a38f024f409b
Author: Joaquim Rocha <jrocha endlessm com>
Date: Thu Sep 14 13:13:05 2017 +0200
Remove the version from the cache name
This was a mechanism for invalidating the cache on every new minor
version. However, that won't avoid problems if the cache needs to be
invalidated before a new version, and it will normally just end up in
having to fetch the cached assets again for no real reason.
This may seem like a tiny detail, but for users with unreliable or
metered internet connections, having to download all the assets on
every new version will hamper a good UX.
lib/gs-utils.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/lib/gs-utils.c b/lib/gs-utils.c
index 846da9c..ccdb1f6 100644
--- a/lib/gs-utils.c
+++ b/lib/gs-utils.c
@@ -152,8 +152,6 @@ gs_utils_get_cache_filename (const gchar *kind,
{
g_autofree gchar *basename = NULL;
g_autofree gchar *cachedir = NULL;
- g_autofree gchar *vername = NULL;
- g_auto(GStrv) version = g_strsplit (VERSION, ".", 3);
g_autoptr(GFile) cachedir_file = NULL;
g_autoptr(GPtrArray) candidates = g_ptr_array_new_with_free_func (g_free);
@@ -199,10 +197,8 @@ gs_utils_get_cache_filename (const gchar *kind,
/* create the cachedir in a per-release location, creating
* if it does not already exist */
- vername = g_strdup_printf ("%s.%s", version[0], version[1]);
cachedir = g_build_filename (g_get_user_cache_dir (),
"gnome-software",
- vername,
kind,
NULL);
cachedir_file = g_file_new_for_path (cachedir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]