Skip to content

Commit 16d8c63

Browse files
committed
Cache home page for 5 minutes
Cache duration matches that of the meetup.com event data
1 parent eaf4954 commit 16d8c63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythonkc_site/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
from django.conf.urls.defaults import include
55
from django.conf.urls.defaults import patterns
66
from django.conf.urls.defaults import url
7+
from django.views.decorators.cache import cache_page
78
from pythonkc_site.views import PythonKCHome
89

910
# Uncomment the next two lines to enable the admin:
1011
# from django.contrib import admin
1112
# admin.autodiscover()
1213

1314
urlpatterns = patterns('',
14-
url(r'^/?$', PythonKCHome.as_view(), name='home'),
15+
url(r'^/?$', cache_page(60 * 5)(PythonKCHome.as_view()), name='home'),
1516

1617
# Examples:
1718
# url(r'^$', 'pythonkc_site.views.home', name='home'),

0 commit comments

Comments
 (0)