Documentation → Administrator Guides

Cache Management

How Developer Sitemap caching works and how to manage it.

How Caching Works

Developer Sitemap uses the WordPress Transients API to cache generated sitemaps. This improves performance by avoiding repeated database queries and XML generation on every request.

Cache Flow

  1. Request arrives for /sitemap.xml
  2. Plugin checks for cached version in transients
  3. If found and not expired, cached XML is served
  4. If not found or expired, sitemap is regenerated
  5. New sitemap is cached for future requests

Cache Keys

Each sitemap type has its own cache key:

SitemapCache Key
Indexdeveloper_sitemap_index
Postsdeveloper_sitemap_post
Pagesdeveloper_sitemap_page
Productsdeveloper_sitemap_product
Taxonomiesdeveloper_sitemap_taxonomy
Authorsdeveloper_sitemap_author

Cache Settings

Configure caching in Sitemap → Settings under Cache Settings.

SettingDefaultDescription
Enable CacheOnToggle caching on/off
Cache Duration3600 secHow long to cache (1 hour)
GZIP CompressionOffCompress cached output

Cache Duration Guidelines

Site TypeDurationSeconds
News/high-frequency30 minutes1800
Active blog1 hour3600
Business site2-4 hours7200-14400
Static/portfolio24 hours86400

Automatic Invalidation

The cache automatically clears when content changes:

ActionCache Cleared
Post/page publishedRelevant sitemap + index
Post/page updatedRelevant sitemap + index
Post/page deletedRelevant sitemap + index
Product published/updatedProduct sitemap + index
Settings changedAll sitemaps

Manual Regeneration

To manually clear and regenerate all sitemaps:

  1. Go to Sitemap → Dashboard
  2. Click Regenerate Sitemap
  3. Wait for confirmation message

Object Cache Compatibility

Developer Sitemap works with persistent object caches like Redis or Memcached. When an object cache is configured, transients are stored there instead of the database, providing even faster performance.

Compatible Object Caches

  • Redis (via Redis Object Cache plugin)
  • Memcached
  • WP Object Cache

Tip: If you use a persistent object cache, sitemap caching becomes even more efficient since transients are served from memory.