Skip to content

Commit

Permalink
cache page
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyzhang01 committed Dec 8, 2023
1 parent 510045e commit eb22b63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/gsr_booking/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from django.urls import include, path
from rest_framework import routers
from django.views.decorators.cache import cache_page
from utils.cache import Cache

from gsr_booking.views import (
Availability,
Expand All @@ -24,7 +26,8 @@

urlpatterns = [
path("", include(router.urls)),
path("locations/", Locations.as_view(), name="locations"),
path("locations/", Locations.as_view(),
cache_page(Cache.MONTH)(Locations.as_view()), name="locations"),
path("recent/", RecentGSRs.as_view(), name="recent-gsrs"),
path("wharton/", CheckWharton.as_view(), name="is-wharton"),
path("availability/<lid>/<gid>", Availability.as_view(), name="availability"),
Expand Down

0 comments on commit eb22b63

Please sign in to comment.