Correction du cache des ical

Fix #359
This commit is contained in:
Jean-Marie Favreau 2025-03-12 10:14:27 +01:00
parent e4c52e7d90
commit a885d1a064

View File

@ -1082,7 +1082,19 @@ def export_ical(request, cat=None, tag=None, organisation_pk=None, place_pk=None
if filter.has_category_parameters(): if filter.has_category_parameters():
return HttpResponseRedirect(filter.get_new_url()) 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) ical = cache.get(id_cache)
if not ical: if not ical:
calendar = CalendarList( calendar = CalendarList(