Caching sitemaps in Django

前端 未结 4 1552
日久生厌
日久生厌 2020-12-31 16:44

I implemented a simple sitemap class using Django\'s default sitemap application. As it was taking a long time to execute, I added manual caching:

class Short         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 17:14

    50k is not a hard coded parameter.

    You can use class django.contrib.sitemaps.GenericSitemap instead:

    class LimitGenericSitemap(GenericSitemap):
        limit = 2000
    

提交回复
热议问题