Skip to content

Commit 9c2f0de

Browse files
committed
Temporary removal of REDIS cache – 2
1 parent 165c49d commit 9c2f0de

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

api/drf_views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
from django.db.models import Prefetch, Count, Q, OuterRef
1515
from django.utils import timezone
1616

17-
from django.utils.decorators import method_decorator
18-
from django.views.decorators.cache import cache_page
17+
# ¤ FIXME for cache switch-on (see also /main/settings.py)
18+
# ¤ from django.utils.decorators import method_decorator
19+
# ¤ from django.views.decorators.cache import cache_page
1920

2021
from main.utils import is_tableau
2122
from deployments.models import Personnel
@@ -649,7 +650,7 @@ def remove_unconfirmed_events(self, objs):
649650
return [self.remove_unconfirmed_event(obj) for obj in objs]
650651

651652
# Overwrite to exclude the events which require confirmation
652-
@method_decorator(cache_page(1200))
653+
# ¤ @method_decorator(cache_page(1200))
653654
def list(self, request, *args, **kwargs):
654655
now = timezone.now()
655656
date = request.GET.get('date', now)

main/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
}
206206

207207
# To find a more suitable caching strategy, not loading the cache middleware
208-
# temporarily. At enable time pls rename api/t_est_cache.py also. FIXME: # ¤
208+
# temporarily. At enable time pls rename api/t_est_cache.py also. FIXME: search # ¤ - also in /api/drf_views.py
209209
MIDDLEWARE = [
210210
'debug_toolbar.middleware.DebugToolbarMiddleware',
211211
'django.middleware.security.SecurityMiddleware',

0 commit comments

Comments
 (0)