eht16 commented on this pull request.


> +class ThemesView(StaticDocsView):
+    """
+    Fetch the Geany-Themes index from 
https://github.com/geany/geany-themes/tree/master/index
+    """
+
+    template_name = "pages/download/themes.html"
+
+    # ----------------------------------------------------------------------
+    def get_context_data(self, **kwargs):
+        theme_index = self._get_theme_index()
+        context = super(ThemesView, self).get_context_data(**kwargs)
+        context['theme_index'] = theme_index
+        return context
+
+    # ----------------------------------------------------------------------
+    @cache_function(CACHE_TIMEOUT_1HOUR)

I don't know if it's worth, too.
But just implemented it in 
https://github.com/geany/www.geany.org/pull/8/commits/c5a12415d902bdcb5d66538a885e1ca90ea52d88.
 Besides reducing traffic between us and Github, it probably won't make much 
difference: the request durations of the MD5 hash and the whole index JSON are 
almost equal. But anyway, it probably won't hurt and in case of theme index 
updates, the preview page will update quicker.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/www.geany.org/pull/8#discussion_r298792493

Reply via email to