prestaconcept / PrestaSitemapBundle

A symfony bundle that provides tools to build a rich application sitemap. The main goals are : simple, no databases, various namespace (eg. google image), respect constraints etc.
MIT License
347 stars 100 forks source link

how to cache generated sitemap using event populate? #342

Open unclebee10 opened 2 months ago

unclebee10 commented 2 months ago

Using sitemap generate through following these instructions and configuration to changefreq daily Dynamic routes usage but sitemap is being generated with every request and takes so long to load with huge populates, what would be best practice in such case?

yann-eugone commented 1 month ago

I'm not sure I get this right But it seems that you are not dumping your sitemap If so, you should have a look to the dedicated documentation

The idea is that when you have big sitemaps (and I would recommend it even for small ones), you should not generate the sitemap every time, but generate it once and for all, and store it in your public dir That way, your application server (Apache, Nginx...) shall serve the file, and Symfony won't be bothered at all