From 1ff2e37e049004852681794537417a1947bf6f18 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 19 Oct 2014 14:19:05 -0500 Subject: Simplify last modified and etags processing for feeds We had this elaborate system set up with caching and invalidation, which is overkill since we cache the result of the view anyway. Just hit the database when needed to find the last change to the respective model class and be done with it. Signed-off-by: Dan McGee --- main/models.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'main/models.py') diff --git a/main/models.py b/main/models.py index 09b1adc0..1b95f3fa 100644 --- a/main/models.py +++ b/main/models.py @@ -443,12 +443,8 @@ class Meta: db_table = 'package_files' -# connect signals needed to keep cache in line with reality -from main.utils import refresh_latest -from django.db.models.signals import pre_save, post_save +from django.db.models.signals import pre_save -post_save.connect(refresh_latest, sender=Package, - dispatch_uid="main.models") # note: reporead sets the 'created' field on Package objects, so no signal # listener is set up here to do so pre_save.connect(set_created_field, sender=Donor, -- cgit v1.2.3-54-g00ecf