Skip to content

PhoenixKit 1.7.9: The sitemap is served from a file

PhoenixKit 1.7.9 changes how /sitemap.xml is stored. The generated sitemap is now saved as a file, priv/static/sitemap.xml, and served from that file instead of from a cache in memory. Requests answer much faster, and because it is a static file, nginx or a CDN can also serve it directly.

If the file does not exist yet, the first request generates it, so visitors do not get an error. The ETag comes from the file’s modification time, so browsers re-download it only after it changes. In the sitemap settings, Clear Cache is now Clear Sitemap; it clears the sitemap and starts a new generation in the background.

Full release notes: PhoenixKit 1.7.9

1.7.9 · 22 December 2025

Sitemap File-Only Architecture

  • 300x faster responses - Sitemap.xml now loads in ~20ms instead of 6000ms
  • File-based storage - XML stored in priv/static/sitemap.xml for direct nginx/CDN serving
  • ETag from file mtime - Cache validation uses file modification time instead of database config
  • On-demand generation - First request generates sitemap if file doesn’t exist (no 503 errors)
  • Simplified architecture - Removed ETS caching layer for XML, single file instead of per-style files

FileStorage Module

  • New unified API: save/1, load/0, exists?/0, delete/0, get_file_stat/0
  • Path changed to priv/static/sitemap.xml (was priv/phoenix_kit/sitemaps/)
  • Legacy API compatibility maintained for existing code

Admin UI Changes

  • “Clear Cache” button renamed to “Clear Sitemap” for clarity
  • Clear Sitemap now also resets “Last Generated” timestamp

PhoenixKit 1.7.9. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.