Django

Code

Changeset 3705

Show
Ignore:
Timestamp:
08/31/06 19:04:05 (2 years ago)
Author:
adrian
Message:

Added 6-hour caching to djangoproject.com sitemap.xml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • djangoproject.com/django_website/urls.py

    r3701 r3705  
    22from django.contrib.comments.feeds import LatestFreeCommentsFeed 
    33from django.contrib.comments.models import FreeComment 
     4from django.contrib.sitemaps import views as sitemap_views 
    45from django_website.apps.aggregator.feeds import CommunityAggregatorFeed 
    56from django_website.apps.aggregator.models import FeedItem 
    67from django_website.apps.blog.feeds import WeblogEntryFeed 
    78from django_website.sitemaps import FlatPageSitemap, WeblogSitemap, DocumentationSitemap 
     9from django.views.decorators.cache import cache_page 
    810 
    911comments_info_dict = { 
     
    3840    (r'^password_reset/', include('django.conf.urls.admin_password_reset')), 
    3941    (r'^r/', include('django.conf.urls.shortcut')), 
    40     (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), 
     42    (r'^sitemap.xml$', cache_page(sitemap_views.sitemap, 60 * 60 * 6), {'sitemaps': sitemaps}), 
    4143    (r'^admin/', include('django.contrib.admin.urls')), 
    4244    (r'', include('django.contrib.flatpages.urls')),