[gnome-software/wip/flatpak-too-often-refresh] flatpak: Increase cache age request in gs_flatpak_rescan_app_data()




commit 3a3e345420c4d91ae0436d5888ad61aa20bccc60
Author: Milan Crha <mcrha redhat com>
Date:   Thu Sep 1 11:56:19 2022 +0200

    flatpak: Increase cache age request in gs_flatpak_rescan_app_data()
    
    The gs_flatpak_rescan_app_data() can be called quite often, also after
    user actions like install/uninstall of an application. Forcing refresh,
    thus also download from the server, of the files in every call means
    wasting the network bandwidth. Use a cache age, to avoid instant
    re-download of the data from the server.
    
    Related to https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1884

 plugins/flatpak/gs-flatpak.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index b14e05501..8e6d9d530 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1260,7 +1260,7 @@ gs_flatpak_rescan_app_data (GsFlatpak *self,
                            GError **error)
 {
        if (self->requires_full_rescan) {
-               gboolean res = gs_flatpak_refresh (self, 0, interactive, cancellable, error);
+               gboolean res = gs_flatpak_refresh (self, 60, interactive, cancellable, error);
                if (res)
                        self->requires_full_rescan = FALSE;
                else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]