### Eclipse Workspace Patch 1.0
#P Django trunk
Index: django/contrib/sitemaps/views.py
===================================================================
--- django/contrib/sitemaps/views.py	(revision 11476)
+++ django/contrib/sitemaps/views.py	(working copy)
@@ -5,7 +5,7 @@
 from django.utils.encoding import smart_str
 from django.core.paginator import EmptyPage, PageNotAnInteger
 
-def index(request, sitemaps):
+def index(request, sitemaps, sitemap_url_name=None):
     current_site = Site.objects.get_current()
     sites = []
     protocol = request.is_secure() and 'https' or 'http'
@@ -14,7 +14,8 @@
             pages = site().paginator.num_pages
         else:
             pages = site.paginator.num_pages
-        sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.sitemap', kwargs={'section': section})
+        sitemap_url_name = sitemap_url_name or 'django.contrib.sitemaps.views.sitemap'
+        sitemap_url = urlresolvers.reverse(sitemap_url_name, kwargs={'section': section})
         sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url))
         if pages > 1:
             for page in range(2, pages+1):
Index: docs/ref/contrib/sitemaps.txt
===================================================================
--- docs/ref/contrib/sitemaps.txt	(revision 11476)
+++ docs/ref/contrib/sitemaps.txt	(working copy)
@@ -292,6 +292,15 @@
 URLs. In this case, Django will automatically paginate the sitemap, and the
 index will reflect that.
 
+If you are not using the vanilla sitemap view (for example, if it is wrapped
+with a caching decorator), name your sitemap view and pass ``sitemap_url_name``
+to the index view::
+
+   url(r'^sitemap.xml$', sitemap_views.index,
+       {'sitemaps': sitemaps, 'sitemap_url_name': 'sitemaps'}),
+   url(r'^sitemap-(?P<section>.+)\.xml$', cache_page(sitemap_views.sitemap, 86400),
+       {'sitemaps': sitemaps}, name='sitemaps'),  
+
 Pinging Google
 ==============
 
