From a885d1a0647b4729b8cf1e132f6c84c260f3118a Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Wed, 12 Mar 2025 10:14:27 +0100 Subject: [PATCH] Correction du cache des ical Fix #359 --- src/agenda_culturel/views.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 781a990..be47d5d 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -1082,7 +1082,19 @@ def export_ical(request, cat=None, tag=None, organisation_pk=None, place_pk=None if filter.has_category_parameters(): return HttpResponseRedirect(filter.get_new_url()) - id_cache = hashlib.md5(filter.get_url().encode("utf8")).hexdigest() + id_cache = hashlib.md5( + ( + filter.get_url() + + "-" + + str(tag) + + "-" + + str(cat) + + "-" + + str(organisation_pk) + + "-" + + str(place_pk) + ).encode("utf8") + ).hexdigest() ical = cache.get(id_cache) if not ical: calendar = CalendarList(