summaryrefslogtreecommitdiff
path: root/urls.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-01-03 15:00:49 -0600
committerDan McGee <dan@archlinux.org>2012-01-03 15:00:49 -0600
commit9ddbe26e4c397c9a0b9fda73a0ce79bc658464d9 (patch)
tree5be18c7c0e07a602860500962fc5cd121a3024a2 /urls.py
parent5a91a246a848248eb8ec9d9402791c34e5ca0f6b (diff)
Add a few cache headers and minor feed caching back in
Now that we aren't using the middleware, add cache headers on our primary pages so we can prevent some repeat traffic, and cache all feeds for five minutes. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/urls.py b/urls.py
index b01d2ee3..946c7ecd 100644
--- a/urls.py
+++ b/urls.py
@@ -27,12 +27,12 @@ urlpatterns = []
# Feeds patterns, used later
feeds_patterns = patterns('',
(r'^$', 'public.views.feeds', {}, 'feeds-list'),
- (r'^news/$', NewsFeed()),
- (r'^packages/$', PackageFeed()),
+ (r'^news/$', cache_page(300)(NewsFeed())),
+ (r'^packages/$', cache_page(300)(PackageFeed())),
(r'^packages/(?P<arch>[A-z0-9]+)/$',
- PackageFeed()),
+ cache_page(300)(PackageFeed())),
(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
- PackageFeed()),
+ cache_page(300)(PackageFeed())),
)
# Sitemaps